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

Prometheus unit test #1461

Merged
merged 17 commits into from
Jul 28, 2022
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Jun 21, 2022

Fixes #1349 (issue)

Changes

Adds unit test for Prometheus.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@esigo esigo requested a review from a team June 21, 2022 14:36
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #1461 (e26a828) into main (3a8f913) will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1461      +/-   ##
==========================================
+ Coverage   84.61%   84.68%   +0.07%     
==========================================
  Files         155      155              
  Lines        4782     4782              
==========================================
+ Hits         4046     4049       +3     
+ Misses        736      733       -3     
Impacted Files Coverage Δ
ext/src/http/client/curl/http_client_curl.cc 81.07% <0.00%> (+1.14%) ⬆️

ASSERT_EQ(res, code);
}

#endif // ENABLE_METRICS_PREVIEW
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: put the condition here in front of ENABLE_METRICS_PREVIEW? To imply that the previous block is in effect when ENABLE_METRICS_PREVIEW is not defined.

break;
}
case prometheus::MetricType::Untyped:
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

Put an ASSERT here as well to catch unexpected type?

@lalitb
Copy link
Member

lalitb commented Jun 24, 2022

Looks like merging #1454 is failing this PR, as the otlp PR adds AggregationTemporality as part of MetricData :(

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM :)

@ThomsonTan ThomsonTan merged commit e4f3a9c into open-telemetry:main Jul 28, 2022
@esigo esigo deleted the prometheus-unit-test branch July 28, 2022 14:57
bsarden pushed a commit to bsarden/opentelemetry-cpp that referenced this pull request Jul 28, 2022
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit test for Prometheus exporter
3 participants