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

Adding user agent to root span #109

Open
morley92 opened this issue Jul 31, 2024 · 0 comments
Open

Adding user agent to root span #109

morley92 opened this issue Jul 31, 2024 · 0 comments

Comments

@morley92
Copy link

How possible would it be to add the user agent OTEL attribute to the root span? Ideally user_agent.original

I was hoping to achieve this by using the attributesFromHeaders function but this seems to have no effect, e.g:

attributesFromHeaders: {
  'user_agent.original': 'User-Agent'
}

Reading through the code it seems like user agent is added in certain circumstances but this doesn't appear be included in our spans - see

[SemanticAttributes.HTTP_USER_AGENT]: context.headers["user-agent"],

We're not hosting with Vercel if that helps.

Thanks

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

1 participant