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/user_guide/trace.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -623,6 +623,22 @@ Then, you can specify headers in the `infer` method. For references, please
623
623
look at our [tests](https://github.com/triton-inference-server/server/blob/main/qa/L0_trace/opentelemetry_unittest.py),
624
624
e.g. [http context propagation test](https://github.com/triton-inference-server/server/blob/main/qa/L0_trace/opentelemetry_unittest.py#L494-L508).
625
625
626
+
### Custom Backend Tracing
627
+
628
+
In the case when a custom activity needs to be traced in the backend, please
629
+
use `TRITONSERVER_InferenceTraceReportActivity` API. For examples, please
630
+
refer to the [identity backend](https://github.com/triton-inference-server/identity_backend/blob/main/src/identity.cc).
631
+
632
+
In `openTelemetry` trace mode, if one wishes to start a new span, make sure
633
+
that the name of your custom activity ends with `_START`. To end the new span,
634
+
make sure that corresponding activity ends with `_END`. For example, in the
635
+
identity backend, we start a `CUSTOM_ACTIVITY` span, by [reporting](https://github.com/triton-inference-server/identity_backend/blob/oandreeva-custom-trace-activity/src/identity.cc#L872-L876)
636
+
`CUSTOM_ACTIVITY_START` event; and we close this span by [reporting](https://github.com/triton-inference-server/identity_backend/blob/oandreeva-custom-trace-activity/src/identity.cc#L880-L883)
637
+
`CUSTOM_ACTIVITY_END` event.
638
+
639
+
Please note, that it is user's responsibility to make sure that all custom started
640
+
spans are properly ended.
641
+
626
642
### Limitations
627
643
628
644
- OpenTelemetry trace mode is not supported on Windows systems.
0 commit comments