Comments (6)
Yeah, doing it in code solves the issue for me for now, thanks for the pointers.
You can close it or keep it as a feature request to actually add that environment variable :)
from datadog-trace-agent.
Great! Ok, let's keep it as a proposal. Slightly edited the title.
from datadog-trace-agent.
Do you not have access or the possibility to change the config? You can also set the env
tag on traces for the same effect. Most tracers have global tags which you can initialize them with. For Go it would be:
tracer.Start(tracer.WithGlobalTag(ext.Environment, "name"))
from datadog-trace-agent.
I run it as a container in the ECS task, so to change the config file I would need a custom container image for each environment instead of just being able to use the datadog/agent:latest
image. That would be doable, but a bit more cumbersome than just setting an ENV variable depening on environment.
The project I'm setting up at the moment is a rails project, but I can check if I can set the environment in the tracer config there in the meantime.
But anyway, adding DD_APM_ENV
to the list at https://github.com/DataDog/datadog-trace-agent/blob/master/config/merge_env.go#L13-L29 would be really helpful.
from datadog-trace-agent.
The project I'm setting up at the moment is a rails project, but I can check if I can set the environment in the tracer config there in the meantime.
Should be easy based on the Ruby tracer documentation: https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-and-tags
But anyway, adding DD_APM_ENV to the list at https://github.com/DataDog/datadog-trace-agent/blob/master/config/merge_env.go#L13-L29 would be really helpful.
I agree with you. This isn't the only case where an environment variable is missing as 1:1 mapping on the config. We'll have to consider better solutions to this.
For the environment variable, you can now do it in code; but if there's every anything else you can always just create a new Docker image based on the Datadog one and copy your own config into it.
Please let me know if this solves your problem, in which case we can close the issue.
from datadog-trace-agent.
I think it might be best after all to close this now since the problem has a solution.
In a next release (soon) most config options will be settable via environment variables too.
from datadog-trace-agent.
Related Issues (20)
- Concurrent map access crash HOT 2
- Slack link in guidelines isn't available to the public HOT 2
- obfuscate: "query not parsed" for a legitimate looking MySQL query HOT 3
- Remove 'models' package.
- Filter `LIMIT` ranges in sql query resources HOT 1
- Error when run in mac osx HOT 13
- Add yaml config for log location HOT 1
- Missing information in trace agent build HOT 4
- Issue with building trace agent for mac HOT 3
- No pre-compiled binaries are available for 6.x release line HOT 1
- proposal: contrib/google.golang.org/grpc: add streaming grpc interceptor HOT 2
- cmd/trace-agent: resource replace rules get applied to "sql.query" tag too HOT 15
- obfuscate: MSSQL-style bracketed parameters to AS result in odd behaviour
- cannot decode v0.3 traces payload: read limit reached HOT 5
- [DOCS] Possible document drift on integration instructions HOT 4
- Traces whose names contain no alphabetic characters are dropped HOT 4
- trace-agent is not using the configured log_level HOT 6
- proposal: have DD_MAX_MEMORY env var for Docker based HOT 1
- Question asked in the #apm room HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadog-trace-agent.