[ 
https://issues.apache.org/jira/browse/FLINK-39425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Nuyanzin resolved FLINK-39425.
-------------------------------------
    Fix Version/s: 2.4.0
       Resolution: Fixed

> [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
>            Assignee: Sameer Devgan
>            Priority: Major
>             Fix For: 2.4.0
>
>
> {{OpenTelemetryEventReporter logger has a missing init method call  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|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