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

Add hook to set custom span name in django instrumentation #138

Closed
lzchen opened this issue Nov 3, 2020 · 5 comments · Fixed by #407
Closed

Add hook to set custom span name in django instrumentation #138

lzchen opened this issue Nov 3, 2020 · 5 comments · Fixed by #407
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed instrumentation

Comments

@lzchen
Copy link
Contributor

lzchen commented Nov 3, 2020

Similar to wsgi, accept a callback function in DjangoInstrumentor().instrument to be able to pass custom span name.

The specs say "MAY" for this feature, but we should be consistent across our instrumentations.

Part of open-telemetry/opentelemetry-python#1297

@lzchen lzchen changed the title Add hook to set custom span name in requests instrumentation Add hook to set custom span name in django instrumentation Nov 3, 2020
@codeboten codeboten transferred this issue from open-telemetry/opentelemetry-python Nov 5, 2020
@codeboten codeboten added good first issue Good for newcomers help wanted Extra attention is needed instrumentation labels Nov 5, 2020
@NickSulistio
Copy link
Contributor

I can take on this issue! @NickSulistio

cc @alolita

@owais
Copy link
Contributor

owais commented Apr 5, 2021

@NickSulistio I added request/response hooks to Django instrumentation. They can be used to set span name (among other things) on the server span. I think adding a special hook just for span name would be redundant after these changes. Sorry about not notifying you earlier about this.

Good news is that we need similar request/response hooks for all web server instrumentations such as flask, falcon, tornado etc and you can implement that if you'd like. Let me know if that's interesting to you and we can discuss it.

@owais
Copy link
Contributor

owais commented Apr 5, 2021

More details: #408

@NickSulistio
Copy link
Contributor

Hi @owais, do you think that these would be good first issues? This is the first time I'm contributing to an open source project, so I think that if this issues are not too complicated then I would be willing to take them!

@owais
Copy link
Contributor

owais commented Apr 5, 2021

Yes, they're the same complexity as the span name callback was. They're very similar actually. Feel free to ping me on slack if you need help with anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed instrumentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants