Skip to content

Conversation

@cappuc
Copy link
Contributor

@cappuc cappuc commented Sep 21, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 21, 2025 09:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for setting a custom service instance ID in the Laravel OpenTelemetry package. The service instance ID is an important OpenTelemetry attribute that helps distinguish between different instances of the same service.

  • Introduces a new configuration option service_instance_id that can be set via environment variable OTEL_SERVICE_INSTANCE_ID
  • Refactors resource building logic into a dedicated ResourceBuilder class for better organization
  • Updates the service provider to use the new resource builder and fixes a deprecated constant reference

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
config/opentelemetry.php Adds new service_instance_id configuration option
src/Support/ResourceBuilder.php New class to handle OpenTelemetry resource building with service attributes
src/LaravelOpenTelemetryServiceProvider.php Refactored to use ResourceBuilder and fixed deprecated constant usage
tests/Sdk/ServiceTest.php Added tests for service resource attributes and custom instance ID functionality
phpstan-baseline.neon Updated baseline to handle new deprecation warnings
README.md Updated documentation to include the new service_instance_id configuration

@cappuc cappuc merged commit d5aac69 into main Sep 21, 2025
22 checks passed
@cappuc cappuc deleted the feat/service-instance-id branch September 21, 2025 09:20
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.

2 participants