-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
1306:Migrate TailSamplingProcessor to new OTLP-based internal data model and add Composite Sampler #1894
Conversation
…ata model and add composite sampler
Codecov Report
@@ Coverage Diff @@
## master #1894 +/- ##
==========================================
+ Coverage 91.49% 91.56% +0.06%
==========================================
Files 284 284
Lines 16774 16812 +38
==========================================
+ Hits 15348 15394 +46
+ Misses 998 981 -17
- Partials 428 437 +9
Continue to review full report at Codecov.
|
Aren't we doing changes to this processor only after it's moved to -contrib? |
@jpkrohling Can we merge this PR and move the changes? |
The OTLP changes are probably required for the move anyway, so, I'd be OK to have them merged before the move. The inclusion of the composite sampler would probably better to have in the new repo. Are you OK in splitting those two changes? |
Sure i can split them. |
@jpkrohling I have removed composite policy changes from this PR. I will open a new PR on contrib repo once this gets moved. |
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.
There are still a couple of left overs that don't belong to this PR. Otherwise, it's looking good. I love the fact that you added tests where it was missing!
processor/samplingprocessor/tailsamplingprocessor/sampling/numeric_tag_filter.go
Outdated
Show resolved
Hide resolved
processor/samplingprocessor/tailsamplingprocessor/sampling/numeric_tag_filter.go
Outdated
Show resolved
Hide resolved
@jpkrohling Thanks for the review. I have taken care of the review comments. |
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.
Looks sane to me! Time to get a maintainer to review it now.
processor/samplingprocessor/tailsamplingprocessor/sampling/time_provider.go
Outdated
Show resolved
Hide resolved
@tigrannajaryan Thanks for the review. I have taken care of review comments. Requesting review.. |
for _, span := range td.Spans { | ||
if len(span.TraceId) != 16 { | ||
tsp.logger.Warn("Span without valid TraceId", zap.String("SourceFormat", td.SourceFormat)) | ||
func (tsp *tailSamplingSpanProcessor) groupSpansByTraceKey(resourceSpans pdata.ResourceSpans) map[traceKey][]*pdata.Span { |
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.
Note: we should probably change/remove this logic in a next iteration of the processor, especially once open-telemetry/opentelemetry-collector-contrib#1235 is done. For instance, the instrumentation library name isn't being kept by this logic here, and I think it should.
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.
Sure
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
@jpkrohling Thanks for the review |
Is your feature request related to a problem? Please describe. #1410 Design Doc - Added support for composite policy in tailsampling processor. This would help in grouping sampling policies and rate limiting them. https://docs.google.com/document/d/10wpIv3TtXgOik05smHm3nYeBX48Bj76TCMxPy8e1NZw/edit#heading=h.ecy5l2puwtp4 This is a split. Refer PR open-telemetry/opentelemetry-collector#1894 (comment) Due to EasyCLA issue opening a new PR: #4396 Link to tracking Issue: 1306
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Description: Migrate Tail Sampling Processor to the new OTLP-based internal data model and add composite sampler
Adding a feature - Composite Sampler
**Design Doc - Added support for composite policy in tailsampling processor. This would help in grouping sampling policies and rate limiting them. https://docs.google.com/document/d/10wpIv3TtXgOik05smHm3nYeBX48Bj76TCMxPy8e1NZw/edit#heading=h.ecy5l2puwtp4
Link to tracking Issue: 1306
Testing: Unit testing
Documentation: Refer #1306, https://docs.google.com/document/d/10wpIv3TtXgOik05smHm3nYeBX48Bj76TCMxPy8e1NZw/edit#heading=h.ecy5l2puwtp4