Skip to content

Map query/response attributes to OpenTelemetry GenAI semantic conventions for I/O capture #753

Description

@aneez004

Problem

Following the fix in #748 , we tested Apollo MCP Server v1.14.0 and confirmed that GraphQL queries and responses are now being captured in traces with the following attributes:

  • apollo.mcp.graphql_query
  • apollo.mcp.graphql_response
  • apollo.mcp.tool_arguments
  • apollo.mcp.tool_result

However, these appear only in the trace metadata section. Observability platforms like Langfuse expect standardized OpenTelemetry GenAI semantic convention attributes (eg: gen_ai.input.messages, gen_ai.output.messages) to populate their Input/Output views, which are currently empty. I have attached screenshots for reference.

Screenshots

Image Image Image Image

Expected Behavior

Add the standardized GenAI attributes in addition to the custom apollo.mcp.* attributes. Map the tool arguments / graphql query to the corresponding genai input attributes. Map the tool result / graphql response to the corresponding genai output attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions