Skip to content

[BUG]: Setting the "team" tag on logs and traces does not work as a primary tag #4740

@DimitrijeManic

Description

@DimitrijeManic

Tracer Version(s)

2.17.0

Ruby Version(s)

3.4.1

Relevent Library and Version(s)

No response

Bug Report

Setting the team tag on either the log or trace does not set the tag in a way that it could be used as a primary tag to scope APM.
The traces and logs can be queried by using @team:my-team-name but will not work with team:my-team-name making them unavailable to use as additional primary tags.

A workaround for logs can be done via a remapper from attribute -> tag but there is nothing available for traces.

The goal which I am trying to achieve is to allow our teams to scope our API service in APM and view only the endpoints, traces, logs, etc owned by their team. The assumption was that we could set the "team" tag per controller but this doesn't propagate to a real "tag"

Reproduction Code

# DD_SERVICE=my-api

Datadog::Tracing.trace('foo', resource: '/some-endpoint', tags: { 'team' => 'one' }) do
  ...
end

Datadog::Tracing.trace('foo', resource: '/another-endpoint', tags: { 'team' => 'two' }) do
  ...
end

I would expect to be able to use the primary tag filter in APM and scope the service by team one or two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityWas opened by a community memberfeature-requestA request for a new feature or change to an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions