How can I add default attributes? #2175
Answered
by
srikanthccv
thiagoazeredo-quintoandar
asked this question in
Q&A
-
I would like to add some default attributes for all spans, like application name, for example. Could you guys share some example? |
Beta Was this translation helpful? Give feedback.
Answered by
srikanthccv
Oct 4, 2021
Replies: 1 comment 1 reply
-
One way you could achieve this is to use trace.set_tracer_provider(
TracerProvider(
...
resource=Resource.create({..., "application.name": "my-app", ...}),
...
)
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
thiagoazeredo-quintoandar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One way you could achieve this is to use
Resource
and it is probably what you are looking for.