Skip to content

Commit

Permalink
Merge pull request #314 from jackshirazi/global-labels
Browse files Browse the repository at this point in the history
add config redirect for global-labels
  • Loading branch information
jackshirazi authored Jul 3, 2024
2 parents ef59dc0 + 6bedd18 commit 6063c73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private void addAllOptions() {
"The Elastic [`server_url`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-server-url) option corresponds to the OpenTelemetry [`OTEL_EXPORTER_OTLP_ENDPOINT`](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) option.");
addDocumentationOption(
"server_urls",
"The Elastic [`server_urls`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-server-urls) option has no equivalent OpenTelemetry optionyou can only specify one endpoint. Use [OTEL_EXPORTER_OTLP_ENDPOINT](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) instead.");
"The Elastic [`server_urls`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-server-urls) option has no equivalent OpenTelemetry option - you can only specify one endpoint. Use [OTEL_EXPORTER_OTLP_ENDPOINT](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) instead.");
addDocumentationOption(
"secret_token",
"The Elastic [`secret_token`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-secret-token) option corresponds to the OpenTelemetry [OTEL_EXPORTER_OTLP_HEADERS](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers) option. For example: `OTEL_EXPORTER_OTLP_HEADERS=\"Authorization=Bearer an_apm_secret_token\"`.");
Expand All @@ -71,6 +71,9 @@ private void addAllOptions() {
addDocumentationOption(
"environment",
"The Elastic [`environment`](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-environment) option corresponds to setting the `deployment.environment` key in [OTEL_RESOURCE_ATTRIBUTES](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_resource_attributes). For example: `OTEL_RESOURCE_ATTRIBUTES=deployment.environment=testing`.");
addDocumentationOption(
"global_labels",
"The Elastic [`global_labels`](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-global-labels) option corresponds to adding `key=value` comma separated pairs in [OTEL_RESOURCE_ATTRIBUTES](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_resource_attributes). For example: `OTEL_RESOURCE_ATTRIBUTES=alice=first,bob=second`. Such labels will result in labels.key=value attributes on the server, eg labels.alice=first");
addUnspecifiedOption("log_level");
addUnspecifiedOption("log_file");
addUnspecifiedOption("log_file_size");
Expand Down Expand Up @@ -99,7 +102,6 @@ private void addAllOptions() {
addUnspecifiedOption("capture_exception_details");
addUnspecifiedOption("capture_body");
addUnspecifiedOption("capture_headers");
addUnspecifiedOption("global_labels");
addUnspecifiedOption("enable_type_pool_cache");
addUnspecifiedOption("instrument_ancient_bytecode");
addUnspecifiedOption("warmup_byte_buddy");
Expand Down
9 changes: 8 additions & 1 deletion docs/configure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Click on a key to get more information.
* [`enabled`](#enabled)
* [`service_version`](#service_version)
* [`environment`](#environment)
* [`global_labels`](#global_labels)

## Elastic to OpenTelemetry mapping

Expand All @@ -35,7 +36,7 @@ The Elastic [`server_url`](https://www.elastic.co/guide/en/apm/agent/java/curren

### `server_urls`

The Elastic [`server_urls`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-server-urls) option has no equivalent OpenTelemetry optionyou can only specify one endpoint. Use [OTEL_EXPORTER_OTLP_ENDPOINT](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) instead.
The Elastic [`server_urls`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-server-urls) option has no equivalent OpenTelemetry option - you can only specify one endpoint. Use [OTEL_EXPORTER_OTLP_ENDPOINT](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) instead.

{/* This file is auto-generated. Please make changes in *Configuration.java (for example, CoreConfiguration.java) and execute ConfigurationExporter. */}

Expand Down Expand Up @@ -75,6 +76,12 @@ The Elastic [`environment`](https://www.elastic.co/guide/en/apm/agent/java/curre

{/* This file is auto-generated. Please make changes in *Configuration.java (for example, CoreConfiguration.java) and execute ConfigurationExporter. */}

### `global_labels`

The Elastic [`global_labels`](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-global-labels) option corresponds to adding `key=value` comma separated pairs in [OTEL_RESOURCE_ATTRIBUTES](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_resource_attributes). For example: `OTEL_RESOURCE_ATTRIBUTES=alice=first,bob=second`. Such labels will result in labels.key=value attributes on the server, eg labels.alice=first

{/* This file is auto-generated. Please make changes in *Configuration.java (for example, CoreConfiguration.java) and execute ConfigurationExporter. */}



{/* Elastic to OpenTelemetry mapping */}

0 comments on commit 6063c73

Please sign in to comment.