Skip to content

Environment and variables documentation #989

Closed

Description

Following the instruction https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-and-tags

I set the c.env and c.tags in my initializer (rails), both of which return undefined method tags= for #<Datadog::Configuration::Settings

Am I doing this wrong or is the documentation outdated?

Also the link says, you can use DD_TAGS as well,
DD_TAGS: Custom tags in value pairs separated by , (e.g. layer:api,team:intake)
but does that work only for Docker agents? (that's the only place i see reference to this)
Also in the example, the tags are comma separated, but docker documentations says it should be space separate.

Separately, not sure if you guys can help, been trying to work with support people, but it's extremely slow and takes a while to figure it out with them. All I am trying to do is add an extra tag (e.g. sub_env) that I can filter trace metrics (e.g. trace.rack.request.hits) by and use it as a primary tag on APM, but I have tried multiple things, the above being one of them, but it just doesn't work. So far, I have tried passing tags to c.tracer args which shows up in individual traces but no in span, I added ad.datadoghq.com/tags: '{"sub_env": "primary"}' in my pod spec; this shows up under tag on infrastructure but not still picked up by traces. How can I make this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugInvolves a bugcommunityWas opened by a community membercoreInvolves Datadog core libraries

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions