open-telemetry / opentelemetry-php

The OpenTelemetry PHP Library
https://opentelemetry.io/docs/instrumentation/php/
Apache License 2.0
686 stars 170 forks source link

Adds experimental service.instance.id resource detector #1309

Closed matt-hensley closed 2 weeks ago

matt-hensley commented 1 month ago

Adds experimental service.instance.id resource detector per experimental semantic conventions.

This detector has been added to the list of well known detectors with the ID service and can be enabled via the OTEL_PHP_DETECTORS environment variable.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.23%. Comparing base (39f81a3) to head (7729036).

:exclamation: Current head 7729036 differs from pull request most recent head c416219

Please upload reports for the commit c416219 to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/graphs/tree.svg?width=650&height=150&src=pr&token=OE661REHqm&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #1309 +/- ## ============================================ - Coverage 74.32% 74.23% -0.10% - Complexity 2491 2493 +2 ============================================ Files 353 354 +1 Lines 7135 7144 +9 ============================================ Hits 5303 5303 - Misses 1832 1841 +9 ``` | [Flag](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [8.1](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [8.2](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [8.3](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [8.4](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `74.23% <100.00%> (-0.06%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [src/SDK/Resource/Detectors/Service.php](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?src=pr&el=tree&filepath=src%2FSDK%2FResource%2FDetectors%2FService.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL1NESy9SZXNvdXJjZS9EZXRlY3RvcnMvU2VydmljZS5waHA=) | `100.00% <100.00%> (ø)` | | | [src/SDK/Resource/ResourceInfoFactory.php](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?src=pr&el=tree&filepath=src%2FSDK%2FResource%2FResourceInfoFactory.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL1NESy9SZXNvdXJjZS9SZXNvdXJjZUluZm9GYWN0b3J5LnBocA==) | `97.67% <100.00%> (+0.11%)` | :arrow_up: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). Last update [39f81a3...c416219](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1309?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry).
brettmc commented 1 month ago

@matt-hensley looking good. phan and deptrac issues are config-related:

brettmc commented 1 month ago

Couple of minor nits from me, but otherwise looks good.

brettmc commented 1 month ago

The failure is because we just moved from EnvironmentVariables test trait to OpenTelemetry\Tests\TestState - might have been a mis-merge for that to not come across when you merged in main...

brettmc commented 1 month ago

@matt-hensley you can ignore the psalm errors. I'm aware of them: https://github.com/mockery/mockery/issues/1421 If we get desperate, a workaround is to go back a minor version of mockery.

brettmc commented 1 month ago

@matt-hensley if you merge in main now, those psalm errors should be gone.