Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKunz committed Nov 29, 2023
1 parent aea41d0 commit 34eabda
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public class MetricsConfiguration extends ConfigurationOptionProvider implements
private final ConfigurationOption<List<Double>> 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<List<Double>>() {
Expand Down
4 changes: 3 additions & 1 deletion docs/api-opentelemetry.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ In both cases the Elastic APM Agent will respect the <<config-disable-metrics, `

You can use the <<config-custom-metrics-histogram-boundaries, `custom_metrics_histogram_boundaries`>> 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]]
Expand Down Expand Up @@ -178,7 +180,7 @@ If you provide your own `MeterProvider` (see <<otel-metrics-sdk>>), the agent wi
In some cases using just the <<otel-metrics-api, OpenTelemetry API for metrics>> 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`.
Expand Down
4 changes: 4 additions & 0 deletions docs/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.




Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34eabda

Please sign in to comment.