Skip to content
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

Package open-telemetry/opentelemetry-auto-slim can not be installed #1000

Closed
svrnm opened this issue May 10, 2023 · 4 comments
Closed

Package open-telemetry/opentelemetry-auto-slim can not be installed #1000

svrnm opened this issue May 10, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@svrnm
Copy link
Member

svrnm commented May 10, 2023

Describe your environment
MacOS
PHP 8.2.5
composer 2.5.5
opentelemetry module

Steps to reproduce

echo '{"require": {}}' > composer.json
composer require slim/slim:"4.*"
composer require open-telemetry/opentelemetry-auto-slim

What is the expected behavior?
Installation of opentelemetry-auto-slim package in the latest beta version

What is the actual behavior?
The following error:

Cannot use open-telemetry/opentelemetry-auto-slim's latest version 0.0.17 as it requires ext-otel_instrumentation * which is missing from your platform.

In PackageDiscoveryTrait.php line 317:

  Package open-telemetry/opentelemetry-auto-slim has requirements incompatible with your PHP version, PHP extensions and Composer version:
    - open-telemetry/opentelemetry-auto-slim 0.0.17 requires ext-otel_instrumentation * but it is not present.

Additional context
As discussed with @pdelewski this seems to be related to the change from ext-otel_instrumentation to ext-opentelemetry and the fact that composer has minimum stability set to "stable" by default.

I can fix this issue by updating my composer.json to contain "minimum-stability": "beta", at the root level.

I understand that this is an intermediate issue, but maybe this can be fixed by either providing a "0.0.18" release which is equivalent to a beta release or by calling this out in the documentation somewhere (happy to help with the latter)

For reference:

https://getcomposer.org/doc/articles/versions.md#minimum-stability
we have to explicitly tell Composer that we are ok with release candidates and beta releases
https://getcomposer.org/doc/04-schema.md#minimum-stability
This defines the default behavior for filtering packages by stability. This defaults to stable

@svrnm svrnm added the bug Something isn't working label May 10, 2023
@brettmc
Copy link
Collaborator

brettmc commented May 11, 2023

maybe this can be fixed by either providing a "0.0.18" release which is equivalent to a beta release

The downside I see to that is that people will continue to use 0.0.18 and still not get updates until we release a GA. Documentation is probably the better option, I guess in out "getting started" docs?

@svrnm
Copy link
Member Author

svrnm commented May 11, 2023

Documentation is probably the better option, I guess in out "getting started" docs?

To add a little bit of context for #1000, #1001 and #1002, I was trying to see if I can accomplish making the "Roll the dice" application the default sample application for Getting Started in PHP as well. Looks like all the building blocks are there, if you like I can take on that change for PHP as well and while doing that also adjust the docs to ask people to set minimum stability to beta until the first stable release

@GrayWolfy
Copy link

GrayWolfy commented Jun 13, 2023

Guys, I just wonder do i really need this auto-slim package to autoinstrument app? Or I don't need it at all, I still cant get this OpenTelemetry/Instrumentation/hook available. So I continue to seatch what do i need to do to make this work. Thought that this auto-slim can do this. Or can u show me the way with php autoinstrument and manual instrument for php and jaeger, pls. Im dying trying to solve this mystery. And the issue svrnm reported is still there.

@svrnm
Copy link
Member Author

svrnm commented Jun 13, 2023

@GrayWolfy please ask that kind of question at the https://github.com/open-telemetry/opentelemetry-php repository or the #otel-php slack channel

cc @open-telemetry/php-approvers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants