[
https://issues.apache.org/jira/browse/FLINK-39347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072019#comment-18072019
]
Sujit Joshi commented on FLINK-39347:
-------------------------------------
I think I owe an apology. Upon further investigation, I found out that the
problem was not with the reporter, but with the _format_ the filter expects the
metrics to be in. It would be better if users dont draw parallels to regex when
coming up with filter formats like I did. The
[documentation|https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/deployment/metric_reporters/#filter-includes]
for this cannot be clearer.
I was able to get this working by providing "includes" config like so:
{code:java}
metrics.reporter.prom.filter.includes:
- 'jobmanager.job:lastCheckpointDuration,numberOfCompletedCheckpoints:*'
- 'jobmanager:taskSlotsTotal,taskSlotsAvailable,numRunningJobs:*'
- 'taskmanager.*:*Max:*'
- 'taskmanager.*:*Used:*'
- 'taskmanager.*:MemoryUsed:*' {code}
Each entry follows "<scope>[:<name>[,<name>][:<type>[,<type>]]]" (mentioned in
the doc) format. Any deviation from this breaks the logic in the filter.
Sorry for the late reply.
Hope this helps.
> Flink otel reporter doesnt report any metrics
> ---------------------------------------------
>
> Key: FLINK-39347
> URL: https://issues.apache.org/jira/browse/FLINK-39347
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Metrics
> Affects Versions: 2.2.0
> Reporter: Sujit Joshi
> Assignee: Paras Negi
> Priority: Major
>
> Hi,
> Im running Flink 2.2.0 in a Docker Compose setup. We'd like to include only
> certain metrics exported to our otel collector. For this we are using
> `metrics.reporter.otel.filter.includes` in our yaml file. But no matter what
> format I use to export, the included metrics are never exported.
> We have tried following formats:
> {code:java}
> metrics.reporter.otel.filter.includes: flink.jobmanager.taskSlots.total {code}
> {code:java}
> metrics.reporter.otel.filter.includes: >
> flink.jobmanager.taskSlots.total {code}
> {code:java}
> metrics.reporter.otel.filter.includes:
> - 'flink.jobmanager.taskSlots.total' {code}
> {code:java}
> metrics.reporter.otel.filter.includes: >
> *.jobmanager.* {code}
>
> After enabling debug mode, I always see this log:
> 2026-03-27T20:25:19.608364491Z 2026-03-27 20:25:19,608 DEBUG
> org.apache.flink.metrics.otel.OpenTelemetryMetricReporter [] - *Exported 0
> metrics using io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporter*
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)