-
Notifications
You must be signed in to change notification settings - Fork 15
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
Ease process for setting service.name
#78
Comments
I am sure that the correct solution to this issue is to solve spec's issue :) Providing a new env variable should not be a hard change in the spec. I can try to submit a PR in about a week's time the latest. Unless somebody else wishes to do so. |
Spec PR is merge open-telemetry/opentelemetry-specification#1677. We now have |
I think we should wait until the spec gets released to put this in. Otherwise, it could get reverted in the spec pre-release and we'd be stuck with having something custom. |
As pointed out in #25, the
service.name
resource attribute is very important for APM. This attribute is what lets APM identify individual services. Today this defaults tounnamed-<lang>-service
for Splunk libraries. For example, if a user forgets to specify this attribute for a Node service, it'll show up asunnamed-node-service
in APM. If a user forgets to specify it for multiple node service, then APM will likely treat all of those services as a single service.Today the only way to specify a value for this attribute is to use the
OTEL_RESOURCE_ATTRIBUTES
environment varariable. For example.OTEL_RESOURCE_ATTRIBUTES=service.name=svc-payments
. This can be confusing and not obvious for new users. This has been identified in the OTel community and there is an open issue looking to address this.Ideally the OTel community provides a way to easily set the service name and handles any priority resolution with
OTEL_RESOURCE_ATTRIBUTES
if they add support for an additional environment variable. If this does not happen, and we discover this is a major pain point for customers, we need to add our own environment variable to support this.Prior Art
OTEL_RESOURCE_ATTRS
.SERVICE_NAME
environment variable that they defined to set this.The text was updated successfully, but these errors were encountered: