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

Emit metric points as unique ETW events #111

Conversation

mattbodd
Copy link
Contributor

@mattbodd mattbodd commented Sep 18, 2024

Part of #104

Changes

  • Constructs opentelemetry_sdk::metrics::data::ResourceMetrics for each opentelemetry_sdk::metrics::data::Metric data point and emits these as ETW events

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 76.16580% with 92 lines in your changes missing coverage. Please review.

Project coverage is 58.3%. Comparing base (56a6f45) to head (3fac8cb).
Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-etw-metrics/src/exporter/mod.rs 76.1% 92 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #111     +/-   ##
=======================================
+ Coverage   52.3%   58.3%   +6.0%     
=======================================
  Files         38      39      +1     
  Lines       4967    5806    +839     
=======================================
+ Hits        2598    3390    +792     
- Misses      2369    2416     +47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattbodd mattbodd requested a review from a team as a code owner September 18, 2024 19:40
)));
}

for resource_metric in resource_metrics {
Copy link
Member

Choose a reason for hiding this comment

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

the approach used in this PR is extremely inefficient, as it clones the entire metrics and recreates them into a format that the opentelemetry-proto is able to serialize. This is okay for alpha, and will help resolve the size limit issue, but this must be done in a efficient way before stabilizing the component. (that might require support from upstream sdk)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I'm working on a more performant solution but am proposing this PR as an immediate fix for #104

Copy link
Member

Choose a reason for hiding this comment

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

This is okay for an immediate fix.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM as a mitigation for the ETW size limit issue. Definitely need to redesign this to avoid the clone/copy works.
Please add an entry to changelog.md file and we can merge.

@cijothomas cijothomas merged commit 4761fcc into open-telemetry:main Sep 25, 2024
9 checks passed
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.

2 participants