[ 
https://issues.apache.org/jira/browse/FLINK-39425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072998#comment-18072998
 ] 

Sameer Devgan commented on FLINK-39425:
---------------------------------------

I have identified the root cause and have a one-line fix ready along with unit 
and integration tests. I would like to be assigned this ticket to open a PR

> [flink-metrics-otel] OpenTelemetryEventReporter ignores service.name and 
> service.version config 
> ------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39425
>                 URL: https://issues.apache.org/jira/browse/FLINK-39425
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Metrics
>    Affects Versions: 2.1.0, 2.1.1, 2.1.2
>            Reporter: Sameer Devgan
>            Priority: Major
>
> {{OpenTelemetryEventReporter logger has a missing init this }} means the 
> {{service.name}} and {{service.version}} config options, defined in 
> {{{}OpenTelemetryReporterOptions{}}}, are silently ignored for the event 
> reporter. The {{resource}} field in {{OpenTelemetryReporterBase}} remains as 
> {{Resource.getDefault()}} (which sets {{{}service.name = 
> unknown_service:java{}}}), and that default is then baked into the 
> {{SdkLoggerProvider}} at construction time.
> Impact
> When all three reporters are configured with the same {{{}service.name{}}}:
> 1)Metrics and traces are exported with {{service.name = <configured value>}}
> {{{}2){}}}Events (log records) are exported with {{service.name = 
> unknown_service:java}}
> {{This breaks service-name-based correlation in any OTel-compatible backend 
> (Grafana, Datadog, etc.) — queries filtering on }}{{service.name}}{{ return 
> metrics and traces but zero events, making it appear events were never 
> emitted}}
> {{}}
> Reproduction
> {{}}
> Configure the event reporter with a {{{}service.name{}}}:
> {{}}
> metrics.reporter.otel.class: 
> org.apache.flink.events.otel.OpenTelemetryEventReporterFactory
> metrics.reporter.otel.exporter.endpoint: http://localhost:4317
> metrics.reporter.otel.service.name: my-flink-cluster
>  
> {{}}
> Inspect the OTLP payload received by the collector. The 
> {{resourceLogs[].resource.attributes}} will contain {{service.name = 
> unknown_service:java}} instead of {{{}my-flink-cluster{}}}.
> {{}}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to