{
  "configurations": [
    {
      "declarative_name": "java.grpc.capture_metadata.client.request",
      "default": "",
      "description": "A comma-separated list of request metadata keys. gRPC client instrumentation will capture metadata values corresponding to configured keys as span attributes.",
      "examples": [
        "custom-request-header",
        "my-metadata-key,another-metadata-key"
      ],
      "name": "otel.instrumentation.grpc.capture-metadata.client.request",
      "type": "list"
    },
    {
      "declarative_name": "java.grpc.capture_metadata.server.request",
      "default": "",
      "description": "A comma-separated list of request metadata keys. gRPC server instrumentation will capture metadata values corresponding to configured keys as span attributes.",
      "name": "otel.instrumentation.grpc.capture-metadata.server.request",
      "type": "list"
    },
    {
      "declarative_name": "java.grpc.emit_message_events",
      "default": true,
      "description": "Determines whether to emit a span event for each individual message received and sent.",
      "name": "otel.instrumentation.grpc.emit-message-events",
      "type": "boolean"
    },
    {
      "declarative_name": "java.grpc.experimental_span_attributes/development",
      "default": false,
      "description": "Enable the capture of experimental span attributes `grpc.received.message_count`, `grpc.sent.message_count` and `grpc.canceled`.",
      "name": "otel.instrumentation.grpc.experimental-span-attributes",
      "type": "boolean"
    }
  ],
  "description": "This instrumentation enables RPC client and RPC server spans and metrics for gRPC.",
  "display_name": "gRPC",
  "has_javaagent": true,
  "has_standalone_library": true,
  "javaagent_target_versions": [
    "io.grpc:grpc-core:[1.6.0,)"
  ],
  "library_link": "https://github.com/grpc/grpc-java",
  "markdown_hash": "279e277db5ec",
  "name": "grpc-1.6",
  "scope": {
    "name": "io.opentelemetry.grpc-1.6"
  },
  "semantic_conventions": [
    "RPC_CLIENT_SPANS",
    "RPC_CLIENT_METRICS",
    "RPC_SERVER_SPANS",
    "RPC_SERVER_METRICS"
  ],
  "source_path": "instrumentation/grpc-1.6",
  "telemetry": [
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "The duration of an outbound RPC invocation.",
          "instrument": "histogram",
          "name": "rpc.client.duration",
          "unit": "ms"
        },
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC request messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.client.request.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC response messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.client.response.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "The duration of an inbound RPC invocation.",
          "instrument": "histogram",
          "name": "rpc.server.duration",
          "unit": "ms"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC request messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.server.request.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC response messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.server.response.size",
          "unit": "By"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        },
        {
          "attributes": [
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            },
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "SERVER"
        }
      ],
      "when": "default"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "The duration of an outbound RPC invocation.",
          "instrument": "histogram",
          "name": "rpc.client.duration",
          "unit": "ms"
        },
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC request messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.client.request.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC response messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.client.response.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "The duration of an inbound RPC invocation.",
          "instrument": "histogram",
          "name": "rpc.server.duration",
          "unit": "ms"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC request messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.server.request.size",
          "unit": "By"
        },
        {
          "attributes": [
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the size of RPC response messages (uncompressed).",
          "instrument": "histogram",
          "name": "rpc.server.response.size",
          "unit": "By"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "grpc.received.message_count",
              "type": "LONG"
            },
            {
              "name": "grpc.sent.message_count",
              "type": "LONG"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        },
        {
          "attributes": [
            {
              "name": "grpc.received.message_count",
              "type": "LONG"
            },
            {
              "name": "grpc.sent.message_count",
              "type": "LONG"
            },
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            },
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.grpc.status_code",
              "type": "LONG"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.service",
              "type": "STRING"
            },
            {
              "name": "rpc.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "SERVER"
        }
      ],
      "when": "otel.instrumentation.grpc.experimental-span-attributes=true"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.response.status_code",
              "type": "STRING"
            },
            {
              "name": "rpc.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the duration of outbound remote procedure calls (RPC).",
          "instrument": "histogram",
          "name": "rpc.client.call.duration",
          "unit": "s"
        },
        {
          "attributes": [
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.response.status_code",
              "type": "STRING"
            },
            {
              "name": "rpc.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Measures the duration of inbound remote procedure calls (RPC).",
          "instrument": "histogram",
          "name": "rpc.server.call.duration",
          "unit": "s"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.response.status_code",
              "type": "STRING"
            },
            {
              "name": "rpc.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        },
        {
          "attributes": [
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            },
            {
              "name": "network.type",
              "type": "STRING"
            },
            {
              "name": "rpc.method",
              "type": "STRING"
            },
            {
              "name": "rpc.response.status_code",
              "type": "STRING"
            },
            {
              "name": "rpc.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "SERVER"
        }
      ],
      "when": "otel.semconv-stability.opt-in=rpc"
    }
  ]
}