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

feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers #4077

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

aabmass
Copy link
Member

@aabmass aabmass commented Aug 18, 2023

Which problem is this PR solving?

Part of #3461

Short description of the changes

Updated PeriodicExportingMetricReader and PrometheusExporter to accept optional metricProducers and pass them onto the superclass MetricReader constructor.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

This is a simple config change, but I tested them both manually.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #4077 (319ccb3) into main (0cc9a0b) will not change coverage.
The diff coverage is n/a.

❗ Current head 319ccb3 differs from pull request most recent head a5182ba. Consider uploading reports for the commit a5182ba to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4077   +/-   ##
=======================================
  Coverage   92.37%   92.37%           
=======================================
  Files         321      321           
  Lines        9276     9276           
  Branches     1970     1970           
=======================================
  Hits         8569     8569           
  Misses        707      707           
Files Changed Coverage Δ
...etry-exporter-prometheus/src/PrometheusExporter.ts 96.25% <ø> (ø)
...etrics/src/export/PeriodicExportingMetricReader.ts 92.98% <ø> (ø)

@aabmass aabmass marked this pull request as ready for review August 18, 2023 04:12
@aabmass aabmass requested a review from a team August 18, 2023 04:12
Copy link
Member

@dyladan dyladan 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 just one question. Why would the MetricProducer return a Resource if it is just going to be ignored? Is it used somewhere else?

@dyladan dyladan added the Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.) label Aug 23, 2023
@aabmass
Copy link
Member Author

aabmass commented Aug 23, 2023

Why would the MetricProducer return a Resource if it is just going to be ignored? Is it used somewhere else?

We had a previous discussion about this #4007 (comment). The initial reason was to re-use the existing MetricProducer as is, which already had this signature. The existing MetricProducer is used by the SDK in MetricReader.setMetricProducer().

@aabmass
Copy link
Member Author

aabmass commented Aug 28, 2023

Could a maintainer merge this in?

@pichlermarc pichlermarc merged commit a793321 into open-telemetry:main Aug 29, 2023
14 checks passed
@aabmass aabmass deleted the metric-producer-prom branch August 29, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge:LGTM This PR is ready to be merged by a Maintainer (has enough valid approvals, successful build, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants