-
Notifications
You must be signed in to change notification settings - Fork 891
CustomProperty improvements #1261
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
Changes from 2 commits
8e91500
1059a94
1065b94
5727e99
edf078e
5c63d64
a297554
f3f47dd
29fc4a4
8bc4e92
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 |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ public override void OnStartActivity(Activity activity, object payload) | |
|
|
||
| if (activity.IsAllDataRequested) | ||
| { | ||
| activity.SetCustomProperty(RequestCustomPropertyName, request); | ||
| this.options.Enrich?.Invoke(activity, "OnStartActivity", request); | ||
|
eddynaka marked this conversation as resolved.
Outdated
Member
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. Also - can you ensure that unit test validate that Enrich is called only if Activity is sampled-in.
Contributor
Author
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. Just added a test. Let me know what do you think before I update everything |
||
|
|
||
| var path = (request.PathBase.HasValue || request.Path.HasValue) ? (request.PathBase + request.Path).ToString() : "/"; | ||
| activity.DisplayName = path; | ||
|
|
@@ -152,7 +152,9 @@ public override void OnStopActivity(Activity activity, object payload) | |
| } | ||
|
|
||
| var response = context.Response; | ||
| activity.SetCustomProperty(ResponseCustomPropertyName, response); | ||
|
|
||
| this.options.Enrich?.Invoke(activity, "OnStopActivity", response); | ||
|
|
||
| activity.SetTag(SemanticConventions.AttributeHttpStatusCode, response.StatusCode); | ||
|
|
||
| if (TryGetGrpcMethod(activity, out var grpcMethod)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.