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

feat: adds oneagent initialization to django start #5

Open
wants to merge 4 commits into
base: jsm-master
Choose a base branch
from

Conversation

abxsantos
Copy link
Member

Info

This adjusts the service data not being sent to dynatrace correctly (trace_id, span_id, etc.) in a django application running with gunicorn.

There were some issues that helped finding out how we could solve this:
Dynatrace/OneAgent-SDK-for-Python#9 (comment)
dynatrace-oss#73 (comment)

Then the documentation itself
https://github.com/Dynatrace/OneAgent-SDK-for-Python?tab=readme-ov-file#using-the-oneagent-sdk-for-python-with-forked-child-processes-only-available-on-linux

The implementation proposed here, aims to force the child processes of gunicorn to be instrumented at the app ready stage, thus allowing the correct data to be sent to one agent.

To better observe this, I've added a new view allowing the service to call itself.

Evidences

Traces being displayed
image

Specific distributed trace of a ping GET request.
image

Logs being displayed
image

@abxsantos abxsantos added the bug Something isn't working label Mar 27, 2024
@abxsantos abxsantos self-assigned this Mar 27, 2024
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "autodynatrace"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question]
Shouldn't this project be named jsm-autodynatrace?

Homepage = "https://github.com/juntossomosmais/OneAgent-SDK-Python-AutoInstrumentation"
"Issue Tracker" = "https://github.com/juntossomosmais/OneAgent-SDK-Python-AutoInstrumentation/issues"


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[chore]
Remove empty line

Comment on lines +21 to +24
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion]
Add remaining versions, or keep only Python :: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants