Problem/Motivation

opentelemetry-php/sem-conv released 1.27.0 (https://github.com/opentelemetry-php/sem-conv/releases/tag/1.27.0).

In it there's a new deprecation (https://github.com/opentelemetry-php/sem-conv/commit/04685638c98df03419b...) that breaks our daily "updated deps" test pipeline on the PHPStan job with a cheery:

 ------ ----------------------------------------------------------------------- 
  Line   core/tests/Drupal/Tests/PerformanceTestTrait.php (in context of class  
         Drupal\FunctionalJavascriptTests\PerformanceTestBase)                  
 ------ ----------------------------------------------------------------------- 
  474    Fetching deprecated class constant DEPLOYMENT_ENVIRONMENT of           
         interface OpenTelemetry\SemConv\ResourceAttributes:                    
         Use `deployment.environment.name`                                      
 ------ ----------------------------------------------------------------------- 

Steps to reproduce

See (for example) https://git.drupalcode.org/project/drupal/-/pipelines/264585

Proposed resolution

- Fix deprecation
- $ composer update open-telemetry/sem-conv since the fix (probably) won't pass on previous versions

If that fails to happen in a relatively short timespan: Suppress the deprecation, and create a new issue for it.
That way the daily "updated deps" test pipeline doesn't stop at the Lint-phase and keeps on catching other (for us) problematic updates in dependencies.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3470235

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Spokje created an issue. See original summary.

spokje’s picture

Issue summary: View changes

spokje’s picture

Status: Active » Needs work

To me it looks like the current value of ResourceAttributes::DEPLOYMENT_ENVIRONMENT, being 'local', should now come from a GitLab variable?

But what do I know about performance tests on core: Absolutely nothing!

spokje’s picture

Issue summary: View changes
catch’s picture

I think it can be s/DEPLOYMENT_ENVIRONMENT/DEPLOYMENT_ENVIRONMENT_NAME/g

spokje’s picture

Status: Needs work » Needs review

Thanks @catch.

That proved that:
a) I indeed have no knowledge about performance testing on core.
b) I completely misunderstood the needed changes in my comment #4.

Oh well, NR :)

catch’s picture

Status: Needs review » Reviewed & tested by the community

This looks great - we don't really use this as such because it's designed for sites using OpenTelemetry for production monitoring, whereas our (mis-) use of it for performance testing doesn't have any concept of stage/dev/prod. Looks like they just renamed the constant so straightforward change.

  • catch committed 09613541 on 11.x
    Issue #3470235 by Spokje: open-telemetry/sem-conv:1.27.0 introduces new...
catch’s picture

Version: 11.x-dev » 10.4.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Actual change is trivial so even though I RTBCed this I'm going to go ahead and commit it. Committed/pushed to 11.x, thanks!

I think we should do the same thing in 10.4.x, so moving there for backport.

spokje’s picture

Status: Patch (to be ported) » Needs review

  • catch committed b65b0637 on 10.4.x
    Issue #3470235 by Spokje, catch: open-telemetry/sem-conv:1.27.0...
catch’s picture

Status: Needs review » Fixed

Committed/pushed to 10.4.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.