You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sameer Devgan (Jira)" <ji...@apache.org> on 2026/04/12 18:58:00 UTC

[jira] [Updated] (FLINK-39425) [flink-metrics-otel] OpenTelemetryEventReporter ignores service.name and service.version config

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

Sameer Devgan updated FLINK-39425:
----------------------------------
    Description: 
{{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|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{}}}.

  was:
{{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{}}}.

{{}}

 


> [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|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)