Skip to content

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

@guisehn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    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