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

ETW Exporter - Add support for Sampler and ID Generator #1547

Merged
merged 18 commits into from
Aug 24, 2022

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Aug 9, 2022

Changes

ETW exporter has its own header-only SDK which doesn't support Sampling, and custom id generation. This PR adds that support.

Please provide a brief description of the changes here.

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

@lalitb lalitb requested a review from a team August 9, 2022 00:37
@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #1547 (8456710) into main (39d6a22) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1547      +/-   ##
==========================================
- Coverage   85.02%   85.00%   -0.02%     
==========================================
  Files         156      156              
  Lines        4977     4977              
==========================================
- Hits         4231     4230       -1     
- Misses        746      747       +1     
Impacted Files Coverage Δ
sdk/src/trace/batch_span_processor.cc 90.63% <0.00%> (-0.78%) ⬇️

@lalitb lalitb changed the title [WIP] ETW Exporter - Add support for Sampler and ID Generator ETW Exporter - Add support for Sampler and ID Generator Aug 9, 2022
@lalitb lalitb changed the title ETW Exporter - Add support for Sampler and ID Generator [WIP] ETW Exporter - Add support for Sampler and ID Generator Aug 9, 2022
@lalitb lalitb changed the title [WIP] ETW Exporter - Add support for Sampler and ID Generator ETW Exporter - Add support for Sampler and ID Generator Aug 9, 2022
Tracer(*this, name, evtFmt)};
return nostd::shared_ptr<opentelemetry::trace::Tracer>{tracer};
Copy link
Member Author

@lalitb lalitb Aug 10, 2022

Choose a reason for hiding this comment

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

@ThomsonTan - Can you please review this PR when you have time? The changes were crashing earlier while creating Spans that are not sampled. The fix is to create the Tracer using std::shared_ptr, and then move/encapsulate it to nostd::shared_ptr (as done in line 1014 and 1016 above).

@@ -26,18 +26,21 @@

#include "opentelemetry/common/key_value_iterable_view.h"

#include "opentelemetry/trace/span.h"
#include "opentelemetry/trace/noop.h"
//#include "opentelemetry/trace/span.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this neede?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not required. Removed now.

@ThomsonTan ThomsonTan enabled auto-merge (squash) August 23, 2022 23:54
@ThomsonTan ThomsonTan merged commit 4535347 into open-telemetry:main Aug 24, 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants