Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not picking up DD_VERSION environment variable #84

Open
arsalasif opened this issue Dec 30, 2020 · 6 comments
Open

Not picking up DD_VERSION environment variable #84

arsalasif opened this issue Dec 30, 2020 · 6 comments

Comments

@arsalasif
Copy link

Hello, thanks for making this library, it's super helpful.

I'm using version 0.2.0, and I have a problem that the graphql APM service is not picking up DD_VERSION environment variable.

Any help will be really appreciated, thank you.

@beezz
Copy link
Owner

beezz commented Dec 30, 2020

Hi @arsalasif !

Can you check what version of ddtrace are you using? Reading their docs ~ https://github.com/DataDog/dd-trace-py/blob/16487e51380e28672337a54a9921a73fc44adf07/docs/configuration.rst#configuration ~ DD_VERSION was added in v0.36.0.

@arsalasif
Copy link
Author

Hi @beezz ! Thanks for such a quick response. I am using 0.43.0 version of dd-trace. So celery and celery-beat are able to get the version and I can see that in analytics too. But somehow it's not picking up for graphql service. Interestingly, I can see the same behavior for uvicorn service as well. Any ideas about why?

@arsalasif
Copy link
Author

Hi @beezz. Any update on this? Thank you!

@beezz
Copy link
Owner

beezz commented Jan 13, 2021

Hi @arsalasif! No update so far. I briefly looked into it but did not see anything obvious. Hopefully, I'll have time to take another look at the weekend.

@beezz
Copy link
Owner

beezz commented Jan 19, 2021

Hi @arsalasif !

I was able to track it down to this piece of code:

Only set the version tag on internal spans.

I was able to get the version tag working by setting the environment variable DD_SERVICE to match the graphql service. By default it's graphql e.g.:

DD_SERVICE=graphql DD_VERSION=1.2.3 python app.py

If you changed the service name using the DDTRACE_GRAPHQL_SERVICE environment variable you need to set both e.g.:

DDTRACE_GRAPHQL_SERVICE=foo DD_SERVICE=foo DD_VERSION=1.2.3 python app.py

Please let me know if that works for you!

@arsalasif
Copy link
Author

arsalasif commented Jan 21, 2021

Hi @beezz. I tried both approaches, one where I assigned the DDTRACE_GRAPHQL_SERVICE=web to make it same as my DD_SERVICE and container name. Another where I set DD_SERVICE=graphql. Neither approach worked unfortunately. I have no idea what's wrong here. I tried with multiple deployments and all combinations. Thank you for helping me with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants