Skip to content

[BUG]: gRPC metadata becomes span attributes, not a safe default? #5557

Open

Description

@guisehn

Tracer Version(s)

2.30.0

Ruby Version(s)

Any version

Relevent Library and Version(s)

No response

Bug Report

Datadog's gRPC client interceptor automatically adds the RPC metadata as span attributes. This happens here:

Metadata in gRPC is analogous to HTTP headers. One of the use cases is authentication, e.g. transferring API keys, user authentication data, etc. More info

For this reason, blindly sending metadata fields as span attributes doesn't seem to be a safe default.

Additionally, passing things in metadata seems to be the only way to add custom client span attributes at the moment, but anything in metadata is also transferred through the network to the gRPC server. Could we have a way to pass span attributes without adding them to the metadata?

Reproduction Code

No response

Configuration Block

No response

Error Logs

No response

Operating System

No response

How does Datadog help you?

No response

Activity

  1. added
    bugInvolves a bug
    communityWas opened by a community member
    on Apr 3, 2026
  2. changed the title [-][BUG]: RPC metadata becomes span attributes, probably not a safe default?[/-] [+][BUG]: gRPC metadata becomes span attributes, probably not a safe default?[/+] on Apr 3, 2026
  3. changed the title [-][BUG]: gRPC metadata becomes span attributes, probably not a safe default?[/-] [+][BUG]: gRPC metadata becomes span attributes, not a safe default?[/+] on Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions