You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the possible inconsistency where the sender could be given an instance of OtlpConfig that differs from the one passed to OtlpMeterRegistry. It is not clear which would be used or why. Now it is clear that the config on the registry will be used and the same sender can be used with different registry instances, potentially configured with different addresses (OtlpConfig#url).
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/implementations/otlp.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ management:
40
40
key1: value1
41
41
----
42
42
43
-
1. `url` - The URL to which data is reported. Environment variables `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` and `OTEL_EXPORTER_OTLP_ENDPOINT` are also supported in the default implementation. If a value is not provided, it defaults to `http://localhost:4318/v1/metrics`
43
+
1. `url` - The address to which metrics are published. Environment variables `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` and `OTEL_EXPORTER_OTLP_ENDPOINT` are also supported in the default implementation. If a value is not provided, it defaults to `http://localhost:4318/v1/metrics`
44
44
2. `batchSize` - number of ``Meter``s to include in a single payload sent to the backend. The default is 10,000.
45
45
3. `aggregationTemporality` - https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality[Aggregation temporality, window=_blank] determines how the additive quantities are expressed, in relation to time. The environment variable `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` is supported by the default implementation. The supported values are `cumulative` or `delta`. Defaults to `cumulative`.
46
46
4. `headers` - Additional headers to send with exported metrics. This can be used for authorization headers. By default, headers are loaded from the config. If that is not set, they can be taken from the environment variables `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS`. If a header is set in both the environmental variables, the header in the latter overrides the former.
@@ -78,7 +78,7 @@ You may use a different `HttpSender` implementation by creating and configuring
You can also provide a custom implementation of `OtlpMetricsSender` that does not use HTTP at all.
81
+
You can also provide a custom implementation of `OtlpMetricsSender` that does not use `HttpSender` at all. `OtlpConfig#url` will be used as the address when the sender is called in the `OtlpMeterRegistry` `publish` method.
82
82
For instance, if you made a gRPC implementation, you could configure it in the following way.
83
83
Micrometer does not currently provide a gRPC implementation of `OtlpMetricsSender`.
Copy file name to clipboardExpand all lines: implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/OtlpHttpMetricsSender.java
+21-24
Original file line number
Diff line number
Diff line change
@@ -32,32 +32,31 @@ public class OtlpHttpMetricsSender implements OtlpMetricsSender {
Copy file name to clipboardExpand all lines: implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OtlpMeterRegistryTest.java
0 commit comments