open-telemetry/opentelemetry-ruby-contrib

Follow semantic conventions for naming graphql spans

開放

#560 建立於 2023年7月13日

 (4 則留言) (0 個反應) (1 位負責人)Ruby (252 個分叉)auto 404
good first issuehelp wantedinstrumentation-graphqlkeep

倉庫指標

星標
 (135 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南