You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/trace/extending-the-sdk/README.md
+9-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,10 @@ not covered by the built-in exporters:
38
38
* Exporters should avoid generating telemetry and causing live-loop, this can be
39
39
done via `OpenTelemetry.SuppressInstrumentationScope`.
40
40
* Exporters should use `Activity.TagObjects` collection instead of
41
-
`Activity.Tags` to obtain the full set of attributes (tags).
41
+
`Activity.Tags` to obtain the full set of attributes (tags). `Activity.Tags` only
42
+
returns tags whose value are of type `string` ([source](https://source.dot.net/#System.Diagnostics.DiagnosticSource/System/Diagnostics/Activity.cs,74de547549e574e0,references)).
43
+
For improved performance, use [Activity.EnumerateTagObjects](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activity.enumeratetagobjects?view=net-8.0)
44
+
if planning to enumerate over all TagObjects.
42
45
* Exporters should use `ParentProvider.GetResource()` to get the `Resource`
43
46
associated with the provider.
44
47
@@ -256,6 +259,11 @@ Custom processors can be implemented to cover more scenarios:
256
259
and `OnShutdown`.
257
260
*`OnStart` and `OnEnd` should be thread safe, and should not block or take long
258
261
time, since they will be called on critical code path.
262
+
* Processors should use `Activity.TagObjects` collection instead of
263
+
`Activity.Tags` to obtain the full set of attributes (tags). `Activity.Tags` only
264
+
returns tags whose value are of type `string` ([source](https://source.dot.net/#System.Diagnostics.DiagnosticSource/System/Diagnostics/Activity.cs,74de547549e574e0,references)).
265
+
For improved performance, use [Activity.EnumerateTagObjects](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activity.enumeratetagobjects?view=net-8.0)
0 commit comments