oag-mcp
    Preparing search index...

    Function toOtelAttributes

    • Map logged fields to OpenTelemetry attributes.

      • transport becomes network.transport (pipe for stdio, tcp for Streamable HTTP, with network.protocol.name: http), as the MCP conventions describe.
      • toolName also sets mcp.method.name: tools/call and gen_ai.operation.name: execute_tool.
      • Undefined values are dropped.

      Parameters

      • fields: Record<string, unknown>

        camelCase fields, already redacted and bounded

      Returns Record<string, unknown>

      attributes keyed by attribute name