-
Notifications
You must be signed in to change notification settings - Fork 736
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
Update the custom processor project #996
Changes from all commits
4932755
783c5ef
f810fcb
3fb4711
c2a3ff7
a4718c6
4c76ab3
e3ea8ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,12 @@ public static void Main() | |
{ | ||
using var otel = Sdk.CreateTracerProvider(b => b | ||
.AddActivitySource("MyCompany.MyProduct.MyLibrary") | ||
.AddProcessorPipeline(pipeline => | ||
{ | ||
pipeline.AddProcessor(current => new MyActivityProcessor()); | ||
})); | ||
|
||
// TODO: seems buggy if you remove A and B here, MyActivityProcessor(C).OnEnd is not called. | ||
// TODO: should the dispose order be C, B, A or A, B C? | ||
.AddProcessorPipeline(p => p.AddProcessor(current => new MyActivityProcessor("A"))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is adding multiple processor pipelines. I guess you wanted to add multiple processors to the same, single pipeline? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope, I was using this to showcase how pipeline could be confusing, and I think we need to change it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fan out scenario is a separate topic, and the name should be changed #979. |
||
.AddProcessorPipeline(p => p.AddProcessor(current => new MyActivityProcessor("B"))) | ||
.AddProcessorPipeline(p => p.AddProcessor(current => new MyActivityProcessor("C")))); | ||
|
||
using (var activity = MyActivitySource.StartActivity("SayHello")) | ||
{ | ||
|
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.
Need to take the next ActivityProcessor, and call its corresponding methods in Start/End/etc.
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.
For demonstration I was trying to make it simple by not chaining the processors at all.