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

exporters/prometheusremotewrite: Do not append '_total' to counter metric names #2993

Merged
merged 8 commits into from
May 17, 2021

Conversation

Aneurysm9
Copy link
Member

This appears to have been enforcing convention but isn't actually required.

Description: The prometheusremotewriteexporter no longer appends "_total" to the name of counter metrics that don't already end in "_total". This was exposed by the PRW conformance test suite and this change partially addresses open-telemetry/wg-prometheus#43.

@Aneurysm9 Aneurysm9 requested a review from a team as a code owner April 22, 2021 22:27
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #2993 (420f897) into main (73b55f0) will decrease coverage by 0.41%.
The diff coverage is 100.00%.

❗ Current head 420f897 differs from pull request most recent head 9776799. Consider uploading reports for the commit 9776799 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2993      +/-   ##
==========================================
- Coverage   92.06%   91.65%   -0.42%     
==========================================
  Files         313      312       -1     
  Lines       15439    15427      -12     
==========================================
- Hits        14214    14139      -75     
- Misses        817      881      +64     
+ Partials      408      407       -1     
Impacted Files Coverage Δ
exporter/prometheusremotewriteexporter/helper.go 99.54% <100.00%> (-0.04%) ⬇️
service/zpages.go 0.00% <0.00%> (-80.00%) ⬇️
internal/version/version.go 80.00% <0.00%> (-20.00%) ⬇️
extension/zpagesextension/zpagesextension.go 78.57% <0.00%> (-14.29%) ⬇️
internal/collector/telemetry/telemetry.go 94.44% <0.00%> (-5.56%) ⬇️
exporter/prometheusremotewriteexporter/exporter.go 89.33% <0.00%> (-1.21%) ⬇️
...babilisticsamplerprocessor/probabilisticsampler.go 98.97% <0.00%> (-1.03%) ⬇️
receiver/jaegerreceiver/trace_receiver.go 73.50% <0.00%> (-0.06%) ⬇️
component/application_info.go 100.00% <0.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e28b1ca...9776799. Read the comment docs.

…tric names.

This appears to have been enforcing convention but isn't actually required.

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Copy link
Contributor

@rakyll rakyll left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @Aneurysm9!

@odeke-em
Copy link
Member

Kindly cc-ing @bogdandrutu.

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 6, 2021
@Aneurysm9
Copy link
Member Author

This PR was marked stale due to lack of activity. It will be closed in 7 days.

cc @open-telemetry/collector-approvers

@alolita
Copy link
Member

alolita commented May 6, 2021

@anuraaga @open-telemetry/collector-approvers - please take a look and approve. There are other Prometheus issues that are dependent on this fix being merged.

@github-actions github-actions bot removed the Stale label May 7, 2021
Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Just nits

exporter/prometheusremotewriteexporter/helper.go Outdated Show resolved Hide resolved
exporter/prometheusremotewriteexporter/helper_test.go Outdated Show resolved Hide resolved
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Copy link
Member

@gramidt gramidt left a comment

Choose a reason for hiding this comment

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

Looks good! LGTM

@alolita alolita added the ready-to-merge Code review completed; ready to merge by maintainers label May 14, 2021
@bogdandrutu
Copy link
Member

I think this needs a rebase to pass the required checks

@bogdandrutu bogdandrutu merged commit 4f9e3c0 into open-telemetry:main May 17, 2021
@Aneurysm9 Aneurysm9 deleted the prom_name_label branch May 17, 2021 21:54
dashpole pushed a commit to dashpole/opentelemetry-collector that referenced this pull request Jun 14, 2021
…tric names (open-telemetry#2993)

* exporters/prometheusremotewrite: Do not append '_total' to counter metric names.

This appears to have been enforcing convention but isn't actually required.

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Address PR feedback

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md to reflect removal of _total suffix enforcement in PRW exporter

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
Co-authored-by: jeffreyc-splunk <jeffreyc-splunk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants