-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datadog exporter improvements #5609
base: dev
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration comment: When we update otel to the latest library, what will be the impact on this configuration that we're adding. Will it continue to work unchanged or will it become redundant or ...?
### Datadog `span.kind` now populated ([PR #5609](https://github.com/apollographql/router/pull/5609)) | ||
|
||
Datadog traces use `span.kind` to differentiate between different types of spans. | ||
This change ensures that the `span.kind` is correctly populated using the Open Telemetry span kind which has a 1-2-1 mapping to thouse set out in [dd-trace](https://github.com/DataDog/dd-trace-go/blob/main/ddtrace/ext/span_kind.go). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change ensures that the `span.kind` is correctly populated using the Open Telemetry span kind which has a 1-2-1 mapping to thouse set out in [dd-trace](https://github.com/DataDog/dd-trace-go/blob/main/ddtrace/ext/span_kind.go). | |
This change ensures that the `span.kind` is correctly populated using the Open Telemetry span kind which has a 1-2-1 mapping to those set out in [dd-trace](https://github.com/DataDog/dd-trace-go/blob/main/ddtrace/ext/span_kind.go). |
@@ -0,0 +1,32 @@ | |||
### Datadog span metrics now supported ([PR #5609](https://github.com/apollographql/router/pull/5609)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Datadog span metrics now supported ([PR #5609](https://github.com/apollographql/router/pull/5609)) | |
### Datadog span metrics are now supported ([PR #5609](https://github.com/apollographql/router/pull/5609)) |
@@ -0,0 +1,32 @@ | |||
### Datadog span metrics now supported ([PR #5609](https://github.com/apollographql/router/pull/5609)) | |||
|
|||
When using the APM view in Datadog, span metrics will be displayed for any span that was a top level span or has been explicitly has `_dd.measured` flag set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using the APM view in Datadog, span metrics will be displayed for any span that was a top level span or has been explicitly has `_dd.measured` flag set. | |
When using the APM view in Datadog, span metrics will be displayed for any span that was a top level span or has the `_dd.measured` flag set. |
@@ -18,8 +18,9 @@ pub(crate) const REQUEST_SPAN_NAME: &str = "request"; | |||
pub(crate) const QUERY_PLANNING_SPAN_NAME: &str = "query_planning"; | |||
pub(crate) const HTTP_REQUEST_SPAN_NAME: &str = "http_request"; | |||
pub(crate) const SUBGRAPH_REQUEST_SPAN_NAME: &str = "subgraph_request"; | |||
pub(crate) const QUERY_PARSING_SPAN_NAME: &str = "parse_query"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a "drive-by" fix. Should this be called out in the changelog as additional functionality or split into its own PR?
/// Which spans will be eligable for span stats to be collected for viewing in the APM view. | ||
/// Defaults to true for `router` and `supergraph`, `subgraph`, `subgraph_request`, `http_request` and `query_planning`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment isn't accurate. It is missing at least execution. I would expect the defaults to be as listed in BUILT_IN_SPAN_NAMES
, so probably better to just reference that.
@@ -170,13 +196,97 @@ impl TracingConfigurator for Config { | |||
.expect("cargo version is set as a resource default;qed") | |||
.to_string(), | |||
) | |||
// This prevents spurious errors in the log when talking to the agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another "drive-by", which probably merits some mention in the changelog.
@@ -166,7 +166,7 @@ The default resource mappings are: | |||
| `subgraph_request` | `graphql.operation.name` | | |||
| `http_request` | `http.route` | | |||
|
|||
You may override these mappings by specifying the `resource_mapping` configuration: | |||
You may override these mappings by specifying `resource_mapping` configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may override these mappings by specifying `resource_mapping` configuration: | |
You may override these mappings by specifying the `resource_mapping` configuration: |
This PR updates the Datadog exporter with a backport from the latest code.
The exporter code has been placed in the
apollo-router/src/plugins/telemetry/tracing/datadog_exporter
directory.It also fixes:
span.kind
not being propagatedSpan metrics are enabled for major built in spans by default.
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩