diff --git a/changelog/12721.doc.md b/changelog/12721.doc.md new file mode 100644 index 000000000000..c6bf170ad641 --- /dev/null +++ b/changelog/12721.doc.md @@ -0,0 +1 @@ +Updated tracing documentation to include tracing in the action server and the REST Channel. \ No newline at end of file diff --git a/docs/docs/monitoring/tracing.mdx b/docs/docs/monitoring/tracing.mdx index 6177799cdae7..ce3504e6d112 100644 --- a/docs/docs/monitoring/tracing.mdx +++ b/docs/docs/monitoring/tracing.mdx @@ -40,13 +40,22 @@ No further action is required to enable tracing. You can disable tracing by leaving the `tracing:` configuration key empty in your endpoints file. +### Rasa Channels + +Trace context sent along with requests using the [W3C Trace Context Specification](https://www.w3.org/TR/trace-context/) +via the REST channel is used to continue tracing in Rasa Pro. + ### Action Server -The trace context is sent along with requests to the custom action server -using the [W3C Trace Context Specification](https://www.w3.org/TR/trace-context/). -You can use this trace context to continue tracing the request through -your custom action code. See [traced events](#traced-events) for -details on what attributes are made available as part of the trace context. +The trace context from Rasa Pro is sent along with requests to the custom action server +using the [W3C Trace Context Specification](https://www.w3.org/TR/trace-context/) and +then used to continue tracing the request through the custom action server. + +Tracing is continued in the action server by instrumenting the webhook that receives custom actions. +See [Action server attributes](#action-server-attributes) for the attributes captured as part of the trace context. + +See [traced events](#traced-events) for +details on what attributes are made available as part of the trace context in Rasa Pro. ## Configuring a Tracing Backend or Collector @@ -162,3 +171,26 @@ Observable `TrackerStore` and `LockStore` attributes include: - `number_of_streamed_events`: number of new events to stream - `broker_class`: the `EventBroker` on which the new events are published - `lock_store_class`: Name of lock store used to lock conversations while messages are actively processed + +## Tracing in the Action Server + +API Requests are traced as they flow through the action server by +instrumenting the webhook that receives custom actions. + +### Action server Attributes +The following attributes are captured as part of the trace context; +- `http.method`: the http method used to make the request +- `http.route`: the endpoint of the request +- `next_action`: the name of the next action to be executed +- `version`: the rasa version used +- `sender_id`: the id of the source of the message +- `message_id`: the unique message id + +You can also continue tracing the request further along +your custom action code by [creating spans](https://opentelemetry.io/docs/instrumentation/python/manual/#creating-spans) +to track the execution of any desired object. + +Enabling and disabling tracing in the action server is also done in the same way as described [above](#enabling--disabling). +The same Tracing Backends/Collectors listed [above](#supported-tracing-backendscollectors) are also supported for the action server. +See [Configuring a Tracing Backend or Collector](#configuring-a-tracing-backend-or-collector) +for further instructions. diff --git a/docs/docs/sources/rasa_interactive___help.txt b/docs/docs/sources/rasa_interactive___help.txt index fb7709dd7b83..038fd625928b 100644 --- a/docs/docs/sources/rasa_interactive___help.txt +++ b/docs/docs/sources/rasa_interactive___help.txt @@ -39,7 +39,7 @@ options: --conversation-id CONVERSATION_ID Specify the id of the conversation the messages are in. Defaults to a UUID that will be randomly - generated. (default: 79ba3c9bd2ab442284916b512a0db99e) + generated. (default: a4c90ee2bc8c4230ae3be0ae1a178894) --endpoints ENDPOINTS Configuration file for the model server and the connectors as a yml file. (default: endpoints.yml) diff --git a/docs/docs/sources/rasa_shell___help.txt b/docs/docs/sources/rasa_shell___help.txt index 3b50596dc9d4..2e8c2c5f2ab7 100644 --- a/docs/docs/sources/rasa_shell___help.txt +++ b/docs/docs/sources/rasa_shell___help.txt @@ -30,7 +30,7 @@ options: -h, --help show this help message and exit --conversation-id CONVERSATION_ID Set the conversation ID. (default: - 6f35fa875fa64a8baf621db57b1096a8) + 5a9d9a60d7564e518914e600c840526f) -m MODEL, --model MODEL Path to a trained Rasa model. If a directory is specified, it will use the latest model in this