This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/graphql-java-12.0.md.

GraphQL Java

OpenTelemetry Java agent instrumentation

This instrumentation enables spans for GraphQL operations.

  • Name: graphql-java-12.0
  • Scope: io.opentelemetry.graphql-java-12.0
  • Target versions: com.graphql-java:graphql-java:[12,20)
  • Library: https://www.graphql-java.com/

Telemetry

  • Span attributes: graphql.document, graphql.operation.name, graphql.operation.type

Configuration

OptionTypeDefaultDescription
otel.instrumentation.graphql.capture-querybooleantrueWhether to capture the query in graphql.document span attribute.
otel.instrumentation.graphql.operation-name-in-span-name.enabledbooleanfalseWhether GraphQL operation name is added to the span name. WARNING: The GraphQL operation name is provided by the client and can have high cardinality. Use only when the server is not exposed to malicious clients.
otel.instrumentation.graphql.query-sanitization.enabledbooleantrueEnables sanitization of sensitive information from queries so they aren't added as span attributes.

Data

  • JSON: /data/javaagent/instrumentations/graphql-java-12.0/graphql-java-12.0-3334ef17a2a8.json
  • Explore: /java-agent/instrumentation/graphql-java-12.0