Skip to content

Environment configuration not being picked up #1032

Closed

Description

We recently updated our dd-trace-rb to 0.35.1 and were using this configuration before

Datadog.configure do |c|
    c.use :rails, service_name: Runtime.app_name,
                  distributed_tracing: true,
                  trace_agent_hostname: ENV.fetch('DD_AGENT_HOST', 'localhost'),
                  trace_agent_port: ENV.fetch('DD_TRACE_AGENT_PORT', 8126)

    # sets env for APM services
    c.tracer.set_tags(env: 'stage')
end

once we updated we found that set_tags was erroring since the method has been removed

After looking at the changelog for 0.34.0 we then updated our configuration to

Datadog.configure do |c|
    c.use :rails, service_name: Runtime.app_name,
                  distributed_tracing: true,
                  trace_agent_hostname: ENV.fetch('DD_AGENT_HOST', 'localhost'),
                  trace_agent_port: ENV.fetch('DD_TRACE_AGENT_PORT', 8126)

    # sets env for APM services
    c.env = 'stage'
end

But this doesn't seem to work. All of our traces show up with env:none in datadog. Wondering if we misconfigured something or if this is simply a bug.

Please let me know if I can provide anything else to help. Thanks!

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 memberintegrationsInvolves tracing integrations

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions