Skip to content

Commit ae14c5e

Browse files
[skip ci] Publish documentation v2.0.0
1 parent 63ee502 commit ae14c5e

File tree

12 files changed

+1232
-0
lines changed

12 files changed

+1232
-0
lines changed

inspectit-ocelot-documentation/website/versioned_docs/version-2.0.0/breaking-changes/breaking-changes.md

Lines changed: 406 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
id: version-2.0.0-configuration-sources
3+
title: Configuration Sources
4+
original_id: configuration-sources
5+
---
6+
7+
inspectIT Ocelot tries to implement the zero-configuration approach but lets you externalize the configuration and influence every bit of its configuration if this is required.
8+
Internally it uses the Spring-based `PropertySource` order to allow overriding of configuration values.
9+
Configuration properties are considered in inspectIT Ocelot in the following order:
10+
11+
1. [Java Agent Arguments](#java-agent-arguments)
12+
1. [Java System Properties](#java-system-properties)
13+
1. [OS environment Variables](#os-environment-variables)
14+
1. External Configuration Sources:
15+
* [File-based Configuration](configuration/external-configuration-sources.md#file-based-configuration)
16+
1. inspectIT Ocelot Defaults
17+
18+
When an invalid configuration is given to inspectIT on startup, the agent will use a fallback configuration.
19+
In this fallback configuration, the agent is inactive with the exception of listening for configuration updates.
20+
21+
When giving an invalid configuration through a runtime update to the agent, the agent will simply retain the previous configuration.
22+
23+
## Available Configuration Sources
24+
25+
### Java Agent Arguments
26+
27+
You can pass a JSON object as string to the agent via its command line arguments.
28+
For example, to override the service name used to identify your application reporting the performance data,
29+
you can change the `inspectit.service-name` property as follows:
30+
31+
```bash
32+
$ java -javaagent:/path/to/inspectit-ocelot-agent-2.0.0.jar="{ \"inspectit\": { \"service-name\": \"My Custom Service\" }}" -jar my-java-program.jar
33+
```
34+
35+
Note that you have to escape the quotes within your JSON string. On linux you can just use the more readable single quotes notation:
36+
37+
```bash
38+
$ java -javaagent:/path/to/inspectit-ocelot-agent-2.0.0.jar='{ "inspectit": { "service-name": "My Custom Service" }}' -jar my-java-program.jar
39+
```
40+
41+
### Java System Properties
42+
43+
You can pass any configuration property as the Java System property to the Java command that you use to start your Java application.
44+
Using this approach you can change the `inspectit.service-name` property as follows:
45+
46+
```bash
47+
$ java -Dinspectit.service-name="My Custom Service" -javaagent:/path/to/inspectit-ocelot-agent-2.0.0.jar -jar my-java-program.jar
48+
```
49+
50+
### OS Environment Variables
51+
52+
Similar to the Java System properties, inspectIT Ocelot will also consider all the available operating system environment variables.
53+
Due to the relaxed bindings, you can use upper case format, which is recommended when using system environment variables.
54+
55+
```bash
56+
$ INSPECTIT_SERVICE_NAME="My Custom Service" java -javaagent:/path/to/inspectit-ocelot-agent-2.0.0.jar -jar my-java-program.jar
57+
```
58+
59+
## Relaxed Bindings
60+
61+
Note that due to the Spring-powered configuration approach, the inspectIT Ocelot agent uses Spring support for relaxed bindings.
62+
This means that a property can be specified in different formats depending on the property source.
63+
As suggested by Spring, the allowed formats are:
64+
65+
| Property | Note |
66+
| --- | --- |
67+
| `inspectit.service-name` | Kebab-case, which is recommended for use in `.properties` and `.yml` files. |
68+
| `inspectit.serviceName` | Standard camelCase syntax. |
69+
| `inspectit.service_name` | Underscore notation (snake_case), which is an alternative format for use in `.properties` and `.yml` files. |
70+
| `INSPECTIT_SERVICE_NAME` | UPPER_CASE format, which is recommended when using system environment variables. |
71+
72+
The formats should be used in the following way, based on the type of property source:
73+
74+
| Property Source | Format |
75+
| --- | --- |
76+
| System properties | Camel case, kebab case, or underscore notation. |
77+
| Environment Variables | Upper case format with the underscore as the delimiter. |
78+
| Property files (`.properties`) | Camel case, kebab case, or underscore notation. |
79+
| YAML files (`.yaml`, `.yml`) | Camel case, kebab case, or underscore notation. |
80+
81+
## Environment Information
82+
83+
Each agent stores the following information about its runtime environment:
84+
85+
| Property | Note |
86+
| --- | --- |
87+
| `inspectit.env.agent-dir` | Resolves to the path where the agent-jar is stored. |
88+
| `inspectit.env.hostname` | The hostname where the agent is running. |
89+
| `inspectit.env.pid` | The process id of the JVM process. |
90+
91+
They are used to define the default behavior when writing the configuration persistence file and will be sent
92+
as attributes to the configuration server when fetching the configuration.
93+
94+
You can reference these properties within the configuration using e.g. `${inspectit.env.agent-dir}`
95+
as shown in the default configuration for
96+
[HTTP-based configuration](configuration/external-configuration-sources.md#http-based-configuration).
97+
Referencing every other property follows the same schema.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: version-2.0.0-open-census-configuration
3+
title: Using OpenCensus Library with inspectIT Ocelot
4+
sidebar_label: OpenCensus Configuration
5+
original_id: open-census-configuration
6+
---
7+
8+
If you plan to use the OpenCensus library in an application which will be instrumented later on with inspectIT Ocelot, some special rules do apply.
9+
Following these rules will make sure that there are no run-time problems in your application.
10+
Furthermore, a correct configuration will make it possible to combine metrics and traces that you manually collect using the OpenCensus instrumentation library with the ones collected by the inspectIT Ocelot agent.
11+
12+
1. Make sure you are using the same version of OpenCensus as inspectIT Ocelot.
13+
14+
The inspectIT Ocelot agent in version 2.0.0 internally uses OpenCensus in version 0.28.3. Please adapt any OpenCensus dependency in your application to this version to avoid run-time conflicts.
15+
```XML
16+
<dependency>
17+
<groupId>io.opencensus</groupId>
18+
<artifactId>opencensus-api</artifactId>
19+
<version>0.28.3</version>
20+
</dependency>
21+
```
22+
23+
2. Set the JVM property `inspectit.publishOpenCensusToBootstrap` to `true`.
24+
25+
```
26+
-Dinspectit.publishOpenCensusToBootstrap=true
27+
```
28+
29+
Setting the above property to `true` tells inspectIT Ocelot that you plan to use the OpenCensus library in combination with the agent. Note that this property must be specified with this exact name. The flexibility offered for all other config options does not apply here. The inspectIT Ocelot agent will make sure that all OpenCensus classes are then loaded by the bootstrap class loader. This ensures that OpenCensus implementation is shared between your manual instrumentation and the agent instrumentation, making the combination of data possible.
30+
31+
3. Add the agent to the start of a JVM
32+
33+
In this scenario, it is required that you add the agent via [the `javaagent` JVM argument](getting-started/installation.md#adding-the-agent-to-a-jvm). If the agent is successfully added to the JVM, it will log that the OpenCensus classes pushed to the bootstrap classloader will be used.
34+
35+
It is important to state that the agent will *not* publish the OpenCensus classes to the bootstrap classloader if it is attached during runtime – even if the previously mentioned JVM argument is set! In this case, metrics and traces of *manual OpenCensus instrumentations* will *not* be collected by the inspectIT Ocelot agent.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: version-2.0.0-open-telemetry-configuration
3+
title: Using OpenTelemetry Library with inspectIT Ocelot
4+
sidebar_label: OpenTelemetry Configuration
5+
original_id: open-telemetry-configuration
6+
---
7+
8+
><mark> TODO: finish the configuration documentation when the migration to OTEL (with the OTEL bridge) is finished, i.e., when all exporters (including OTLP exporters) are supported
9+
</mark>
10+
If you plan to use the OpenTelemetry library in an application which will be instrumented later on with inspectIT Ocelot, some special rules do apply.
11+
Following these rules will make sure that there are no run-time problems in your application.
12+
Furthermore, a correct configuration will make it possible to combine metrics and traces that you manually collect using the OpenTelemetry instrumentation library with the ones collected by the inspectIT Ocelot agent.
13+
14+
1. Make sure you are using the same version of OpenTelemetry as inspectIT Ocelot.
15+
16+
The inspectIT Ocelot agent in version 2.0.0 internally uses OpenTelemetry in version {opentelemetry-version}. Please adapt any OpenTelemetry dependency in your application to this version to avoid run-time conflicts.
17+
```XML
18+
<dependency>
19+
<groupId>io.opentelemetry</groupId>
20+
<artifactId>opentelemetry-api</artifactId>
21+
<version>{opentelemetry-version}</version>
22+
</dependency>
23+
```
24+
25+
2. Set the JVM property `inspectit.publishOpenTelemetryToBootstrap` to `true`.
26+
27+
```
28+
-Dinspectit.publishOpenTelemetryToBootstrap=true
29+
```
30+
31+
Setting the above property to `true` tells inspectIT Ocelot that you plan to use the OpenTelemetry library in combination with the agent. Note that this property must be specified with this exact name. The flexibility offered for all other config options does not apply here. The inspectIT Ocelot agent will make sure that all OpenTelemetry classes are then loaded by the bootstrap class loader. This ensures that OpenTelemetry implementation is shared between your manual instrumentation and the agent instrumentation, making the combination of data possible.
32+
33+
3. Add the agent to the start of a JVM
34+
35+
In this scenario, it is required that you add the agent via [the `javaagent` JVM argument](getting-started/installation.md#adding-the-agent-to-a-jvm). If the agent is successfully added to the JVM, it will log that the OpenTelemetry classes pushed to the bootstrap classloader will be used.
36+
37+
It is important to state that the agent will *not* publish the OpenTelemetry classes to the bootstrap classloader if it is attached during runtime – even if the previously mentioned JVM argument is set! In this case, metrics and traces of *manual OpenTelemetry instrumentations* will *not* be collected by the inspectIT Ocelot agent.

0 commit comments

Comments
 (0)