You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we know, service.name is a required resource attribute and service.version is a "this is not required but you should really set this damn thing" resource attribute too.
The two major ways to set these are in code or environment variables. Each has a drawback though:
If you set it in code, these will get picked up by manual instrumentation. But automatic instrumentation (e.g. from an agent) may not pick them up, and so you can be in a situation where your service.name is actually unknown_service for automatic instrumentation, but your manual instrumentation has the right service.name.
If you set it in environment variables, then this effectively makes it required to use environment variables with automatic instrumentation, thus making things more complicated (you now need to remember to set this in every environment your app runs in, you can't keep track of these values in your actual service code, etc.)
An addition to option 1) would be to ensure SDKs that manually set service.name also set the corresponding environment variables so auto instrumentation picks them up. This would likely be an spec and subsequent SDK change.
As we know,
service.name
is a required resource attribute andservice.version
is a "this is not required but you should really set this damn thing" resource attribute too.The two major ways to set these are in code or environment variables. Each has a drawback though:
service.name
is actuallyunknown_service
for automatic instrumentation, but your manual instrumentation has the rightservice.name
.In Honeycomb docs, we've opted for the environment variable route: https://docs.honeycomb.io/getting-started/quickstart/#add-auto-instrumentation-to-your-application
The rationale is that it's better to be correct (and frankly follow some best practices)
Should this also be done for all docs here?
The text was updated successfully, but these errors were encountered: