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.
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
Step 1 - Use new Activity to Replace OT Span #660
Step 1 - Use new Activity to Replace OT Span #660
Changes from 1 commit
de877fb
d063b01
14b5298
3ecb6f3
729cda1
f61e636
9552fa8
b40be27
8e4b3f9
9e452ec
017b289
ad47cdc
4b19fe1
620023a
9066f72
3cba75c
c988dd1
1019ba7
e895e42
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is
parent
end up being display name or "enumeration" name?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.
If not a display name, please add code that sets the display name
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.
StartActivity("anythinghere") - "anythinghere" becomes OperationName, DisplayName by default. DisplayName can be overridden, but OperationName cannot be.
I think the intention is DisplayName to become OT SpanName, as OT allows changing it after starting, but Activity.OperationName is fixed at creation.
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.
Are integers and other types allowed?
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.
Only string - this is a drift from OT.
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.
please add example with the result setting. I bet the most of implementation will need
try{}catch
to indicate that the activity failedThere 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.
If parent may be null (see
parent?.
), will theusing
statement fail?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.
No. Parent will be null if none is listening.
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.
This is going to be a real pain, many many people will forgot the null check.
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.
To sergey's qn - the using statement doesn't fail.
But any other place where parent is not nullchecked will fail. Hence the
parent?
usage throughout. Users are expected to do this, and this is unit testable easily.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.
nit, indent.
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 crossing this with dotnet/runtime#35326 I can understand the parameters but it will be good to name the parameters or add comments here, especially for the second and third parameters. Anyway, the signatures are already better per https://source.dot.net/#System.Diagnostics.DiagnosticSource/System/Diagnostics/ActivityListener.cs,42a5d087d90a1839,references