From 34eabda6d138db71339184047aef9724dd060144 Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Wed, 29 Nov 2023 13:22:23 +0100 Subject: [PATCH] Update documentation --- .../apm/agent/configuration/MetricsConfiguration.java | 5 ++++- docs/api-opentelemetry.asciidoc | 4 +++- docs/configuration.asciidoc | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java index 9af16dfecf..90c5ff563e 100644 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java +++ b/apm-agent-core/src/main/java/co/elastic/apm/agent/configuration/MetricsConfiguration.java @@ -48,7 +48,10 @@ public class MetricsConfiguration extends ConfigurationOptionProvider implements private final ConfigurationOption> customMetricsHistogramBoundaries = ConfigurationOption.builder(new ListValueConverter<>(DoubleValueConverter.INSTANCE), List.class) .key("custom_metrics_histogram_boundaries") .configurationCategory(METRICS_CATEGORY) - .description("Defines the default bucket boundaries to use for OpenTelemetry histograms.") + .description("Defines the default bucket boundaries to use for OpenTelemetry histograms.\n" + + "\n" + + "Note that for OpenTelemetry 1.32.0 or newer this setting will only work when using API only. " + + "The default buckets will not be applied when bringing your own SDK.") .dynamic(false) .tags("added[1.37.0]", "experimental") .addValidator(new ConfigurationOption.Validator>() { diff --git a/docs/api-opentelemetry.asciidoc b/docs/api-opentelemetry.asciidoc index 376cf8f6b4..c883924b12 100644 --- a/docs/api-opentelemetry.asciidoc +++ b/docs/api-opentelemetry.asciidoc @@ -149,6 +149,8 @@ In both cases the Elastic APM Agent will respect the <> setting to customize histogram bucket boundaries. Alternatively you can use OpenTelemetry `Views` to define histogram buckets on a per-metric basis when providing your own `MeterProvider`. +Note that `custom_metrics_histogram_boundaries` will only work for API Usages. If you bring your own `MeterProvider` and therefore your own OpenTelemetry SDK, +the setting will only work for SDK versions prior to `1.32.0`. [float] [[otel-metrics-api]] @@ -178,7 +180,7 @@ If you provide your own `MeterProvider` (see <>), the agent wi In some cases using just the <> might not be flexible enough. Some example use cases are: - * Using OpenTelemetry Views (e.g. to customize histogram buckets on a per-metric basis) + * Using OpenTelemetry Views * Exporting metrics to other tools in addition to Elastic APM (e.g. prometheus) For these use cases you can just setup you OpenTelemetry SDK `MeterProvider`. diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index 1b8bb856a8..1e260f579b 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -2547,6 +2547,8 @@ NOTE: This feature is currently experimental, which means it is disabled by defa Defines the default bucket boundaries to use for OpenTelemetry histograms. +Note that for OpenTelemetry 1.32.0 or newer this setting will only work when using API only. The default buckets will not be applied when bringing your own SDK. + @@ -4618,6 +4620,8 @@ Example: `5ms`. # dedot_custom_metrics=true # Defines the default bucket boundaries to use for OpenTelemetry histograms. +# +# Note that for OpenTelemetry 1.32.0 or newer this setting will only work when using API only. The default buckets will not be applied when bringing your own SDK. # # This setting can not be changed at runtime. Changes require a restart of the application. # Type: comma separated list