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

Support normalized metric names #4555

Merged

Conversation

albertteoh
Copy link
Contributor

@albertteoh albertteoh commented Jun 29, 2023

Which problem is this PR solving?

Short description of the changes

  • Adds the following boolean parameters to declaratively determine whether the metric name should be modified to match normalization rules as defined here:
    • prometheus.query.normalize-calls
    • prometheus.query.normalize-duration
  • Separate flags intentional to allow support for backwards compatibility with older OpenTelemetry Collector versions. A single flag is insufficient.
  • Motivated by a breaking change in: https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.80.0.

Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
@albertteoh albertteoh requested a review from a team as a code owner June 29, 2023 12:46
@@ -18,7 +18,7 @@ run-dev: _run-connector

# _run-connector is the base target to bring up the system required for SPM using the new OTEL spanmetrics connector.
.PHONY: _run-connector
_run-connector: export OTEL_IMAGE_TAG = latest
_run-connector: export OTEL_IMAGE_TAG = 0.80.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thought to fix the version for a more reliable user experience.

@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (f282d9b) 97.03% compared to head (28ee03e) 97.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4555      +/-   ##
==========================================
+ Coverage   97.03%   97.05%   +0.02%     
==========================================
  Files         301      301              
  Lines       17817    17837      +20     
==========================================
+ Hits        17289    17312      +23     
+ Misses        423      421       -2     
+ Partials      105      104       -1     
Flag Coverage Δ
unittests 97.05% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plugin/metrics/prometheus/metricsstore/reader.go 100.00% <100.00%> (ø)
plugin/metrics/prometheus/options.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yurishkuro
Copy link
Member

DCO?

@albertteoh
Copy link
Contributor Author

DCO?

Ah, I must have missed signing one commit. Should be good now, thanks.

@albertteoh albertteoh merged commit 855b226 into jaegertracing:main Jun 29, 2023
31 checks passed
@albertteoh albertteoh deleted the support-normalized-metric-name-1 branch June 29, 2023 20:58
@Multiply
Copy link

Thanks for a fast fix. I'll be trying it out right away. 🚀

afzal442 pushed a commit to Cloud-Hacks/jaeger that referenced this pull request Jul 10, 2023
## Which problem is this PR solving?
- Resolves jaegertracing#4547

## Short description of the changes
- Adds the following boolean parameters to declaratively determine
whether the metric name should be modified to match normalization rules
as defined
[here](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheus/README.md):
  - `prometheus.query.normalize-calls`
  - `prometheus.query.normalize-duration`
- Separate flags intentional to allow support for backwards
compatibility with older OpenTelemetry Collector versions. A single flag
is insufficient.
- Motivated by a breaking change in:
https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.80.0.

---------

Signed-off-by: albertteoh <see.kwang.teoh@gmail.com>
Signed-off-by: Afzal Ansari <afzal442@gmail.com>
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.

[Bug]: spanmetrics via connector not working with otel-collector v0.80.0
3 participants