Skip to content

Commit

Permalink
add connector traces config to observability docs (#306)
Browse files Browse the repository at this point in the history
Co-authored-by: Rob Dominguez <[email protected]>
  • Loading branch information
hgiasac and robertjdominguez authored Mar 19, 2024
1 parent bb25c20 commit 62b3c7f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/query-plan/traces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ Every request to your GraphQL API will have a unique `trace-id` associated with
- `execute`
- `execute_ndc_query`
- `Execute Query`
- `<Connector spans>`
- `execute_ndc_mutation`
- `<Connector spans>`

| Span name | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -59,10 +61,26 @@ Every request to your GraphQL API will have a unique `trace-id` associated with
| `execute_ndc_query` | The span responsible for executing a single ndc query. This span has an attribute `field` which describes the schema type that was executed. |
| `Execute Query` | The span responsible for executing the generated query on the data source. |
| `execute_ndc_mutation` | The span responsible for executing a single ndc mutation. This span has an attribute `field` which describes the field that was executed. |
| `<Connector spans>` | Optional spans from connectors where the engine sends requests to. |

:::info What are spans?

Spans represent the basic unit of work in a distributed system. They describe the operation that an individual component
of the system is doing, such as the time taken to execute a function or a request.

:::

### Connector spans

Connectors can have internal spans that vary depending on the database or business logic. Those traces are exported
separately from the connector. You don't need to worry about it If you deploy the connector to DDN cloud. However,
self-hosted connectors need to configure some variables or you won't see connector traces on DDN console:

- `OTEL_EXPORTER_OTLP_ENDPOINT`: https://gateway.otlp.hasura.io:443
- `OTEL_EXPORTER_OTLP_HEADERS`: `Authorization=pat <personal-access-token>`

:::info Personal Access Token (PAT)

You can generate a personal access token [here](https://cloud.hasura.io/account-settings/access-tokens).

:::

0 comments on commit 62b3c7f

Please sign in to comment.