opentelemetry-ruby-contrib icon indicating copy to clipboard operation
opentelemetry-ruby-contrib copied to clipboard

Follow semantic conventions for naming graphql spans

Open olliverberry opened this issue 2 years ago • 4 comments

The current graphql instrumentation does not follow span naming conventions detailed here. The documentation states the following: The span name MUST be of the format <graphql.operation.type> <graphql.operation.name> provided that graphql.operation.type and graphql.operation.name are available. If graphql.operation.name is not available, the span SHOULD be named <graphql.operation.type>. When <graphql.operation.type> is not available, GraphQL Operation MAY be used as span name.

The relevant code looks to be here, where graphql.operation.type and graphql.operation.name are added as span attributes but the span is then named graphql.execute_query.

This change would also align with other libraries that already follow this convention, such as nodejs's instrumentation for graphql seen here.

olliverberry avatar Jul 13 '23 12:07 olliverberry

Would you be amenable to opening a PR to fix these?

arielvalentin avatar Jul 13 '23 13:07 arielvalentin

👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.

github-actions[bot] avatar Aug 18 '23 01:08 github-actions[bot]

@arielvalentin would it be possible to reopen this issue?

karmingc avatar May 06 '24 15:05 karmingc

@karmingc - Since you're working on this via #966, I went ahead and assigned you to this issue.

kaylareopelle avatar May 15 '24 22:05 kaylareopelle