-
Notifications
You must be signed in to change notification settings - Fork 825
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: add SimpleSpanProcessor #218
feat: add SimpleSpanProcessor #218
Conversation
packages/opentelemetry-basic-tracer/src/export/SimpleSampledSpanProcessor.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mayurkale22 - is it required from the spec to call it SimpleSampledSpanProcessor? I am wondering because isn't implicit that only sampled spans will be processed? |
d8c68ae
to
5c4f0a9
Compare
Hmm, ok. I changed it to SimpleSpanProcessor. |
Codecov Report
@@ Coverage Diff @@
## master #218 +/- ##
===========================================
- Coverage 94.43% 82.65% -11.78%
===========================================
Files 51 52 +1
Lines 1851 1776 -75
Branches 122 129 +7
===========================================
- Hits 1748 1468 -280
- Misses 103 308 +205
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #218 +/- ##
===========================================
- Coverage 94.43% 82.65% -11.78%
===========================================
Files 51 52 +1
Lines 1851 1776 -75
Branches 122 129 +7
===========================================
- Hits 1748 1468 -280
- Misses 103 308 +205
|
Which problem is this PR solving?
SpanProcessor
.Short description of the changes
This is based on Add SDK span processors spec opentelemetry-specification#205 and split from feat(tracer): implement span processor #149 (to keep PR short and simple).
SimpleSpanProcessor
is one of the built-in span processors which converts theSpan
toReadableSpan
and passes it to the configured exporter (without any batching).Span processors can be registered via a method on SDK Tracer. Example in Java: https://github.com/open-telemetry/opentelemetry-java/blob/861f4e6c551f560c03d69a34829dcdd13461493b/sdk/src/main/java/io/opentelemetry/sdk/trace/TracerSdk.java#L150
Specs are still pending for that, you can follow the discussion here Add SDK span processors spec opentelemetry-specification#205 (comment)
It is possible to have multiple exporter on registered SpanProcessor, discussion Add SDK span processors spec opentelemetry-specification#205 (comment)
I will open another PR to add Batching processor (
BatchSpansProcessor
).