open-telemetry / open-telemetry/opentelemetry-ruby-contrib

Follow semantic conventions for naming graphql spans

Open
#560 4 comments 0 reactions 1 assignee View on GitHub

@karmingc is already working on this.

Since May 15, 2024.

good first issue help wanted instrumentation-graphql keep
Dominant language
Ruby
Stars
137
Forks
258
Avg merge
3d 17h
Merged PRs (30d)
30

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.