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

Allow custom counters implementing CounterInterface to be exported #676

Merged
merged 1 commit into from
May 18, 2022
Merged

Allow custom counters implementing CounterInterface to be exported #676

merged 1 commit into from
May 18, 2022

Conversation

erdemkose
Copy link
Contributor

@erdemkose erdemkose commented May 17, 2022

PrometheusExporter::doExport() only allows instances of OpenTelemetry\SDK\Metrics\Counter class to be exported. This makes it impossible to export counters extending the Counter class or just implementing CounterInterface.

Allowing any counters implementing CounterInterface to be exported would make things easier.

@welcome
Copy link

welcome bot commented May 17, 2022

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 17, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: erdemkose / name: Erdem Köse (cb5f58f)

@bobstrecansky
Copy link
Collaborator

@erdemkose - just a CLA sign and a style check fix and I think we'll be off to the races with this PR 👍🏼

Signed-off-by: Erdem Köse <erdemkose@gmail.com>
@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #676 (cb5f58f) into main (85282b5) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #676   +/-   ##
=========================================
  Coverage     86.07%   86.07%           
  Complexity     1151     1151           
=========================================
  Files           128      128           
  Lines          2794     2794           
=========================================
  Hits           2405     2405           
  Misses          389      389           
Flag Coverage Δ
7.4 86.03% <100.00%> (ø)
8.0 86.07% <100.00%> (ø)
8.1 86.07% <100.00%> (ø)

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

Impacted Files Coverage Δ
src/Contrib/Prometheus/PrometheusExporter.php 93.75% <100.00%> (ø)

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 85282b5...cb5f58f. Read the comment docs.

@erdemkose
Copy link
Contributor Author

@erdemkose - just a CLA sign and a style check fix and I think we'll be off to the races with this PR 👍🏼

@bobstrecansky done and done 👍

@bobstrecansky bobstrecansky merged commit 2e4c849 into open-telemetry:main May 18, 2022
@erdemkose erdemkose deleted the export-counter-interface branch May 18, 2022 06:05
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.

None yet

3 participants