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/grpc-1.6.md.

gRPC

OpenTelemetry Java agent instrumentation

This instrumentation enables RPC client and RPC server spans and metrics for gRPC.

  • Name: grpc-1.6
  • Scope: io.opentelemetry.grpc-1.6
  • Target versions: io.grpc:grpc-core:[1.6.0,)
  • Library: https://github.com/grpc/grpc-java

Telemetry

  • Metrics: rpc.client.duration, rpc.client.request.size, rpc.client.response.size, rpc.server.duration, rpc.server.request.size, rpc.server.response.size, rpc.client.call.duration, rpc.server.call.duration
  • Span attributes: rpc.grpc.status_code, rpc.method, rpc.service, rpc.system, server.address, server.port, network.peer.address, network.peer.port, network.type, grpc.received.message_count, grpc.sent.message_count, error.type, rpc.response.status_code, rpc.system.name

Configuration

OptionTypeDefaultDescription
otel.instrumentation.grpc.capture-metadata.client.requestlistA comma-separated list of request metadata keys. gRPC client instrumentation will capture metadata values corresponding to configured keys as span attributes.
otel.instrumentation.grpc.capture-metadata.server.requestlistA comma-separated list of request metadata keys. gRPC server instrumentation will capture metadata values corresponding to configured keys as span attributes.
otel.instrumentation.grpc.emit-message-eventsbooleantrueDetermines whether to emit a span event for each individual message received and sent.
otel.instrumentation.grpc.experimental-span-attributesbooleanfalseEnable the capture of experimental span attributes grpc.received.message_count, grpc.sent.message_count and grpc.canceled.

Data

  • JSON: /data/javaagent/instrumentations/grpc-1.6/grpc-1.6-2b51215c8085.json
  • Explore: /java-agent/instrumentation/grpc-1.6