Skip to content

How can I add default attributes? #2175

Discussion options

You must be logged in to vote

One way you could achieve this is to use Resource and it is probably what you are looking for.

trace.set_tracer_provider(
    TracerProvider(
        ...
        resource=Resource.create({..., "application.name": "my-app", ...}),
        ...
    )
)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thiagoazeredo-quintoandar
Comment options

Answer selected by thiagoazeredo-quintoandar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants