Skip to content

Commit

Permalink
fix and move content from metrics to traces page
Browse files Browse the repository at this point in the history
  • Loading branch information
shorgi committed Nov 21, 2024
1 parent 26e800c commit 8a94f97
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,7 @@ To export metrics to Datadog, you must configure both the router to send traces

### Router configuration

The router should set attributes that Datadog uses to organize its APM view and other UI:

- `otel.name`: span name that's fixed for Datadog
- `resource.name`: Datadog resource name that's displayed in traces
- `operation.name`: Datadog operation name that populates a dropdown menu in the Datadog service page

You should add these attributes to your `router.yaml` configuration file. The example below sets these attributes for the `router`, `supergraph`, and `subgraph` stages of the router's request lifecycle:

```yaml title="router.yaml"
telemetry:
instrumentation:
spans:
mode: spec_compliant
router:
attributes:
otel.name: router
operation.name: "router"
resource.name:
request_method: true

supergraph:
attributes:
otel.name: supergraph
operation.name: "supergraph"
resource.name:
operation_name: string

subgraph:
attributes:
otel.name: subgraph
operation.name: "subgraph"
resource.name:
subgraph_operation_name: string
```
Consequently you can filter for these operations in Datadog APM:
<img
className="screenshot"
alt="Datadog APM showing operations set with example attributes set in router.yaml"
src="../../../../images/router/datadog-apm-ops-example.png"
width="600"
/>
You should also enable the [OTLP exporter](/router/configuration/telemetry/exporters/metrics/otlp#configuration) and set both `temporality: delta` and `endpoint: <datadog-agent-endpoint>`. For example:
You should enable the [OTLP exporter](/router/configuration/telemetry/exporters/metrics/otlp#configuration) and set both `temporality: delta` and `endpoint: <datadog-agent-endpoint>`. For example:

```yaml title="router.yaml"
telemetry:
Expand Down
46 changes: 46 additions & 0 deletions docs/source/reference/router/telemetry/trace-exporters/datadog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,52 @@ Enable and configure the [Datadog](https://www.datadoghq.com/) exporter for trac

For general tracing configuration, refer to [Router Tracing Configuration](/router/configuration/telemetry/exporters/tracing/overview).

## Attributes for Datadog APM UI

The router should set attributes that Datadog uses to organize its APM view and other UI:

- `otel.name`: span name that's fixed for Datadog
- `resource.name`: Datadog resource name that's displayed in traces
- `operation.name`: Datadog operation name that populates a dropdown menu in the Datadog service page

You should add these attributes to your `router.yaml` configuration file. The example below sets these attributes for the `router`, `supergraph`, and `subgraph` stages of the router's request lifecycle:

```yaml title="router.yaml"
telemetry:
instrumentation:
spans:
mode: spec_compliant
router:
attributes:
otel.name: router
operation.name: "router"
resource.name:
request_method: true

supergraph:
attributes:
otel.name: supergraph
operation.name: "supergraph"
resource.name:
operation_name: string

subgraph:
attributes:
otel.name: subgraph
operation.name: "subgraph"
resource.name:
subgraph_operation_name: string
```
Consequently you can filter for these operations in Datadog APM:
<img
className="screenshot"
alt="Datadog APM showing operations set with example attributes set in router.yaml"
src="../../../../images/router/datadog-apm-ops-example.png"
width="600"
/>
## OTLP configuration
To export traces to Datadog via OTLP, you must do the following:
Expand Down

0 comments on commit 8a94f97

Please sign in to comment.