Skip to content
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

Provide option to use simplified query/mutation resource names for GraphQL spans #10875

Open
goodspark opened this issue Oct 1, 2024 · 0 comments

Comments

@goodspark
Copy link

Summary of problem

The current ddtrace GraphQL integration sets the full query as the resource name. This is fragile for monitoring and metrics purposes because a simple field change will result in a completely new name. In addition, it's kind of unsightly to see a resource name that's so long.

As an example, take a look at ddtrace-graphql. Normally, I'd just use that, but it's out of date and incompatible with the latest versions of ddtrace as well as graphql.

Which version of dd-trace-py are you using?

2.5.0

Which version of pip are you using?

24.2

Which libraries and their versions are you using?

graphene==3.3
graphql-core==3.2.4

How can we reproduce your problem?

Use the GraphQL integration and make a query while tracing is on.

What is the result that you get?

A span with the entire query as the resource name.

What is the result that you expected?

An option in the integration that allows me to instruct ddtrace to only use the query name (if available) as the resource name.

goodspark added a commit to goodspark/dd-trace-py that referenced this issue Oct 1, 2024
goodspark added a commit to goodspark/dd-trace-py that referenced this issue Oct 1, 2024
The current ddtrace GraphQL integration sets the full query as the resource name. This is fragile for monitoring and metrics purposes because a simple field change will result in a completely new name. In addition, it's kind of unsightly to see a resource name that's so long.

As an example, take a look at ddtrace-graphql. Normally, I'd just use that, but it's out of date and incompatible with the latest versions of ddtrace as well as graphql.

Addresses DataDog#10875
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant