-
Notifications
You must be signed in to change notification settings - Fork 782
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
Add support for Activity Status and StatusDescription in Zipkin Exporter #2572
Closed
vishweshbankwar
wants to merge
9
commits into
open-telemetry:main
from
vishweshbankwar:vibankwa/Add-Status-AndStatusDescription-Support-To-Zipkin
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4fe845c
draft
f45aaed
Status and StatusDescription precedence
86c8800
Merge branch 'main' into vibankwa/Add-Status-AndStatusDescription-Sup…
8ea3903
fix precendence
52c5bf6
fix status value
04f267c
changelog
78402a0
Merge branch 'main' into vibankwa/Add-Status-AndStatusDescription-Sup…
vishweshbankwar 1eec129
integration test
82a3f1d
Trigger Build
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Won't this break existing users relying on the extensions which set tags for status? I haven't had a chance to look at this fully yet, but I think we need a migration strategy. It might be possible to do that upstream so we don't have to modify all the existing exporters.
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.
it won't - we will still look up those tags in case
Status
andStatusDescription
is not set. Could you please elaborate on "upstream change"?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.
Got it thanks.
The thought I have is, this is a lot of code and sort of tribal knowledge to expect every exporter to understand and do correctly. Ideally, we smooth that out so that they don't need to worry about it.
Some unknowns...
What do we do with this:
opentelemetry-dotnet/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs
Line 44 in 0ed4ed6
Should it be updated to set activity.Status? I feel like yes.
What about people manually adding
otel.status_code
&otel.status_description
? Right now we check for those and set error flags in zipkin and jaeger because we didn't have Activity.Status but if we change the extension method, should we continue to do that?One random idea as an upstream example we could set otel.status_code and otel.status_descriptions tags from activity.Status/Description (or do the reverse) in a processor as a kind of migration helper people could decide to use or not use. Not saying it is the best option 😄
Basically I think we need to have a strategy for migrating to the new API. For Status and probably the .NET propagation stuff in .NET 6.
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.
We can mark ActivityExtension method SetStatus as [Obsolete] with a message saying "Please use the native activity.SetStatus instead", right?
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.
[VB] We cannot change the behavior of SetStatus() as it will be a breaking change then. The idea here is to keep extensions as is so anyone using it or continues to use it will not be affected. We will mark SetStatus from extensions obsolete and remove it in next major version change 2.x. I have noted some of these points in issue here - #2569.
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.
Sorry @vishweshbankwar hadn't seen the issue! If we
Obsolete
the extension, the idea is in the future we would remove it and then also the logic looking for the tags in the exporters?I hear what you are saying, but I don't know if I 100% agree. If we changed it to chain to activity.Status/Description the API would be the same, only the implementation would change. And it is our prerogative to change our implementation details.
Anyway, I'm OK with the plan. Would still prefer to find a way to do this upstream. Normalize everything onto the Activity API so exporter authors only need to deal with that.
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.
+1, it'll be great if we can clarify the migration story/strategy (in the issue or PR description).
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.
Would still prefer to find a way to do this upstream -- this'd be really nice!
Were you thinking something like
The SDK "checks status inside Tags, and based on that updates the Activity.Status, if not already set", so exporters can be modified to simply look Activity.Status?
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.
@cijothomas
That was the first idea I had, ya. Inside the SDK somewhere, maybe a migration processor people could toggle as needed. What if we had a compatibility level switch somewhere?
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.
@cijothomas @CodeBlanch - Could you please help me understand the following:
How do we remove looking up tags for status in exporters - Wouldn't this be a breaking change in exporters?
If as a user I am using SetTag method to set status, Wouldn't I expect it to continue working without adding processor or switch?
Also, what is the end goal?
Do we want users to move away completely from using tags/SetStatus(StatusCode)?