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

Feature request/add span attributes 'code.function' and 'code.namespace' to http server instrumentation #218

Open
arik-dig opened this issue Dec 26, 2022 · 5 comments

Comments

@arik-dig
Copy link

Feature description

Add the standard code attributes code.function and code.namespace to instrumentation 'io.micronaut.http.server'.

having that allows the user/developer to reach the relevant code of that HTTP endpoint.

@scprek
Copy link

scprek commented Sep 25, 2023

Also related, I think Client instrumentation is worse currently and warrants improvement too

Posted in Discord: https://discordapp.com/channels/1121511613250412714/1154785717612970156

I have https://micronaut-projects.github.io/micronaut-tracing/latest/guide/#http enabled on our services. The server span name looks good (e.g. /v1/path/{id}/path), but the client span names area always generic HTTP GET HTTP_POST vs the path like the server span name. This means in tools I have to expand the attributes to see which url and service it's hitting.
Am I doing something wrong, or is this an improvement needed?

@scprek
Copy link

scprek commented Sep 25, 2023

Sorry wrong link, updated

@graemerocher
Copy link
Contributor

I think this is only the case when you use the low level client but not the declarative client

@scprek
Copy link

scprek commented Sep 25, 2023

Hmm I am using high level. I'll try with the latest again but I was able to get the function name when I manually added '@NewSpan' in the DSL client

@scprek
Copy link

scprek commented Sep 26, 2023

I've confirmed this is happening with the DSL client in 3.9.X. Will circle back if 4.X still has it.

The v1/xxx is the auto server one and the HTTP GET and HTTP POST are the DSL clients.

Screenshot 2023-09-26 at 9 27 26 AM
@Retryable(delay = "500ms", attempts = "2")
@Client("eta-svc")
interface EtaServiceClient {

    @Post("/v1/eta")
    fun requestEta(@Body etaRequest: EtaRequest): EtaResponse?
}

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

3 participants