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

DataSource values are decorated with extra characters for metrics emitters #17743

Open
ashwintumma23 opened this issue Feb 20, 2025 · 0 comments · May be fixed by #17744
Open

DataSource values are decorated with extra characters for metrics emitters #17743

ashwintumma23 opened this issue Feb 20, 2025 · 0 comments · May be fixed by #17744

Comments

@ashwintumma23
Copy link
Contributor

Affected Version

31.0.0
28.0.1

  • Tested on these two versions, but the issue will be present on all supported versions

Description

  • This issue is very similar to Prometheus extension adding underscores to datasource names in some metrics #17648; and was identified while debugging the parent issue. Credits to @sixtus for identifying the parent issue.
  • Metrics reported via SQLExecutionReporter contain heading [ and trailing ] characters for dataSource dimension; which causes inconsistency in reporting dataSource names throughout all the metrics
  • Identified the issue in the following emitters; and will be able to be reproduce on other emitters as well
    • Prometheus Emitter

Image

  • Kafka Emitter

Image

  • Logging Emitter

Image

Root Cause

  • We can see that in the following piece of code in SQLExecutionReporter, a List is being converted to String; which causes the [ and ']' to be added to the dataSource label
        String dataSourcesResourceNames = stmt.authResult.sqlResourceActions
                .stream()
                .map(action -> action.getResource().getName())
                .collect(Collectors.toList())
                .toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant