Closed pirgeo closed 3 months ago
Thanks @pirgeo, feel free to open a PR to add the feature. I've opened a similar PR in the go contrib repo to add it to the config package as well https://github.com/open-telemetry/opentelemetry-go-contrib/pull/5860
Thanks, I might steal copy your tests :)
I recently tried configuring the OTLP exporter for internal telemetry in the OpenTelemetry collector. While doing that, I tried to set the TemporalityPreference for the exported telemetry, which is passed through to the
initOTLPHTTPExporter
andinitOTLPgRPCExporter
methods. However, when looking through the code, it seems like TemporalityPreference and DefaultHistogramAggregation are not converted to options to be passed on to the creation of the metrics exporter (https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/internal/proctelemetry/config.go#L264, I assume this is where it would go). Also, setting these options does not affect the telemetry that the collector emits at all.Is your feature request related to a problem? Please describe. TemporalityPreference and DefaultHistogramAggregation can't be set on the internal telemetry exporters.
Describe the solution you'd like
temporality_preference
anddefault_histogram_aggregation
are passed to the exporter. I have created a branch but am unsure if this is how it's supposed to be done (using themetricdata
package directly). I am happy to open a PR or hand off the code if you think this is the right approach.