Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchSpanProcessor, BatchLogRecordProcessor metrics don't follow semantic convention naming guidelines #5856

Open
jack-berg opened this issue Sep 26, 2023 · 1 comment
Labels
Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

The semantic conventions say things like:

  • metric names and attributes exist in a single universe
  • common attributes should be consistently named

We also generally recommend (though I can't find any explicit text to this) that measurements are recorded with a consistent set of attribute keys for the same instrument. This assists with prometheus/openmetrics compatibility which says:

Metrics are defined by a unique LabelSet within a MetricFamily. Metrics MUST contain a list of one or more MetricPoints. Metrics with the same name for a given MetricFamily SHOULD have the same set of label names in their LabelSet.

We violate this advice in the metrics produced for BatchSpanProcessor and BatchLogRecordProcessor:

  • Both produce a metric named queueSize
    • queueSize isn't namespaced
    • queueSize includes attributes logRecordProcessorType for BatchLogRecordProcessor, and spanProcessorType for BatchSpanProcessor. These attributes are inconsistent, and do not have namespaces.
    • queueSize has a different description in BatchSpanProcessor than in BatchLogRecordProcessor
  • BatchLogRecordProcessor emits processedLogs
    • processedLogs isn't namespaced
    • processedLogs includes attributes logRecordProcessorType, and dropped. Neither is namespaced.
  • BatchSpanProcessor emits processedSpans
    • processedSpans isn't namespaced
    • processedSpans includes attributes spanProcessorType, and dropped. Neither is namespaced.

This leads to issues like #4834. The PR #5836 partially fixes these issues by renaming logRecordProcessorType / spanProcessorType to processorType. But we should go further and fix the remaining issues.

Ideally we would fix everything at once to avoid churn.

@jack-berg jack-berg added the Feature Request Suggest an idea for this project label Sep 26, 2023
@jack-berg
Copy link
Member Author

Related to semantic-conventions#83 which is trying to define language agnostic conventions for these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

1 participant