Skip to content

Conversation

@jaydeluca
Copy link
Member

Fixes some parsing issues related to some of the kafka metric descriptions, which needed to be escaped. Rewrote the class that writes the .telemetry files to use jackson.

This was the error being fixed:

at [Source: (StringReader); line: 120, column: 61] (through reference chain: io.opentelemetry.instrumentation.docs.internal.EmittedMetrics["metrics_by_scope"]->java.util.ArrayList[0]->io.opentelemetry.instrumentation.docs.internal.EmittedMetrics$MetricsByScope["metrics"]->java.util.ArrayList[14])
Nov 16, 2025 2:24:50 AM io.opentelemetry.instrumentation.docs.parsers.EmittedMetricsParser lambda$parseAllMetricFiles$1
SEVERE: Error parsing metrics file (/home/runner/work/opentelemetry-java-instrumentation/opentelemetry-java-instrumentation/instrumentation/kafka/kafka-clients/kafka-clients-0.11/.telemetry/metrics-6309e954-0e9b-46e3-a896-04d2754a39a4.yaml): mapping values are not allowed here
in 'reader', line 120, column 61:
... rage lead of the partition. Note: For topic names with periods ( ...
^

@jaydeluca jaydeluca requested a review from a team as a code owner November 16, 2025 12:48
// We want to ignore test related attributes
private static final List<String> EXCLUDED_ATTRIBUTES =
List.of(
"asdf",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +6903 to +6909
- name: kafka.consumer.assigned_partitions
description: The number of partitions currently assigned to this consumer
type: DOUBLE_GAUGE
unit: ''
attributes:
- name: client-id
type: STRING
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should document telemetry that comes from metric bridges like kafka and micrometer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants