Instrumentation raw objects should be sent as custom properties#1099
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1099 +/- ##
=======================================
Coverage 74.48% 74.48%
=======================================
Files 223 223
Lines 6345 6350 +5
=======================================
+ Hits 4726 4730 +4
- Misses 1619 1620 +1
|
|
|
||
| activity.SetKind(ActivityKind.Client); | ||
| activity.DisplayName = grpcMethod?.Trim('/'); | ||
| activity.SetCustomProperty("GrpcHandler.Request", request); |
There was a problem hiding this comment.
Curious - do we want this to be OTel.GrpcHandler.Request? For example, if someone is debugging a crash dump, they would get some hint that it was added by OpenTelemetry.
There was a problem hiding this comment.
I also think we should expose these strings as public constants in someway, part of the respective instrumentation projects, so that users dont have to remember the string property name.
There was a problem hiding this comment.
I added the "OTel" prefix everywhere we were calling SetCustomProperty. Moved most things to constants. But didn't tackle exposing them right now. Looked around Grpc, it doesn't have really anything that is public other than the builder extension. So we need to figure out how we want that to work. Have a constants class in each project or something? Future PR 😄
There was a problem hiding this comment.
It is unclear to me who is going to benefit from these constants. My take is that if the string literal is only going to show up in the repo once, twice or three times, literal string seems to provide better readability.
…Blanch/opentelemetry-dotnet into instrumentation-raw-objects
We talked about this on the SIG today. Instrumentation should make the raw objects available.