Will-Lo commented on code in PR #3933:
URL: https://github.com/apache/gobblin/pull/3933#discussion_r1578190817


##########
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/OpenTelemetryMetrics.java:
##########
@@ -54,6 +57,10 @@ private OpenTelemetryMetrics(State state) {
   protected MetricExporter initializeMetricExporter(State state) {
     OtlpHttpMetricExporterBuilder httpExporterBuilder = 
OtlpHttpMetricExporter.builder();
     
httpExporterBuilder.setEndpoint(state.getProp(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_ENDPOINT));
+    if 
(state.contains(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_HEADER_KEY)) {
+      
httpExporterBuilder.addHeader(state.getProp(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_HEADER_KEY),
+          
state.getProp(ConfigurationKeys.METRICS_REPORTING_OPENTELEMETRY_HEADER_VALUE));

Review Comment:
   Sometimes, at least for microsoft geneva it can be pretty specific (attach 
account name and namespace) but this also depends greatly depending if you are 
emitting to an endpoint or a metric processor like fluentbit



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to