Skip to content

reduce service detector requirement for instance id #4570

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brettmc
Copy link
Contributor

@brettmc brettmc commented Jun 26, 2025

Fixes #

Changes

The service resource detector SHOULD populate service.instance.id, however some runtimes (notably those frequently used for PHP) use a shared-nothing approach. This leads to a new instance id for each request, eg open-telemetry/opentelemetry-php#1643
Changing the requirement from an implied MUST to SHOULD allows implementations to deviate when necessary, which I plan to do for PHP SIG.

For non-trivial changes, follow the change proposal process.

the service resource detector SHOULD populate service.instance.id, however some runtimes (notably those frequently used for PHP) use a shared-nothing approach. This leads to a new instance id for each request.
@dyladan
Copy link
Member

dyladan commented Jun 26, 2025

Think this may also affect lambda environments where each request potentially is a new service instance.

@dyladan
Copy link
Member

dyladan commented Jun 26, 2025

Seems to me that rather than unpopulating service instance id, this raises the question of what a service instance is. If it is being triggered on each new request, that's probably not correct. But there is likely still some concept of a service instance. In lambda for example, it might be a new instance if there is a new deployment.

@jack-berg
Copy link
Member

I think its a good default for SDKs to include a service.instance.id, and after lengthy discussions we determined that the best value we can do for this is a UUID. To me, the serverless is the exception to the rule, and users (and us via whatever examples they are following) should set an alternative stable service.instance.id value.

Alternatively, the service resource detector could have a config property for users to opt out of service.instance.id. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants