-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove use of service.name in example & Add info about OTEL_SERVICE_NAME #3018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 🙂 Unrelated to this PR, but I wonder if we should mention that the env detector is only added automatically when the SDK is set up with @opentelemetry/sdk-node
Yeah, that might be worthwhile as it is not 100% obvious from that page, although there is a call out at the top that this assumes that people followed the getting started |
@@ -66,11 +66,13 @@ In the above example, the SDK detected the process and also added the | |||
Below you will find instructions to get resources detected automatically for | |||
you. However, you might run into the situation that no detector exists for the | |||
resource you need. In that case you can use the environment | |||
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. For example the | |||
following script adds [Service][], [Host][] and [OS][] resource attributes: | |||
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. You can use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. You can use the | |
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. Additionally you can use the |
minor suggestion otherwise LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a comma after "Additionally".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments.
@@ -66,11 +66,13 @@ In the above example, the SDK detected the process and also added the | |||
Below you will find instructions to get resources detected automatically for | |||
you. However, you might run into the situation that no detector exists for the | |||
resource you need. In that case you can use the environment | |||
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. For example the | |||
following script adds [Service][], [Host][] and [OS][] resource attributes: | |||
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. You can use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a comma after "Additionally".
@@ -66,11 +66,13 @@ In the above example, the SDK detected the process and also added the | |||
Below you will find instructions to get resources detected automatically for | |||
you. However, you might run into the situation that no detector exists for the | |||
resource you need. In that case you can use the environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource you need. In that case you can use the environment | |
resource you need. In that case, use the environment variable |
following script adds [Service][], [Host][] and [OS][] resource attributes: | ||
`OTEL_RESOURCE_ATTRIBUTES` to inject whatever you need. You can use the | ||
environment variable `OTEL_SERVICE_NAME` to set value of the `service.name` | ||
resource attribute. For example the following script adds [Service][], [Host][] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource attribute. For example the following script adds [Service][], [Host][] | |
resource attribute. For example, the following script adds [Service][], [Host][] |
What is the change?
This change removes use of service.name in example and adds some information about setting
service.name
resource attribute via the environment variableOTEL_SERVICE_NAME
in the resources.md file of JS docs.Why the change?
This change contributes to #1830