-
Notifications
You must be signed in to change notification settings - Fork 2
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
Idea: prune flagged autoload files #1
Comments
34ea960 adds two configuration options:
Using open-telemetry/opentelemetry-php-contrib#269 as example, should be able to use: "extra": {
+ "spi-config": {
+ "autoload-files": true
+ },
"spi": {
"OpenTelemetry\\Config\\SDK\\Configuration\\ComponentProvider": [
"OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\LaravelComponentProvider"
- ],
- "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\Instrumentation": [
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\LaravelInstrumentation"
- ],
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Hook": [
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Console\\Command",
-
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Contracts\\Console\\Kernel",
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Contracts\\Http\\Kernel",
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Contracts\\Queue\\Queue",
-
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Foundation\\Console\\ServeCommand",
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Foundation\\Application",
-
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Queue\\Queue",
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Queue\\SyncQueue",
- "OpenTelemetry\\Contrib\\Instrumentation\\Laravel\\Hooks\\Illuminate\\Queue\\Worker"
]
}
}, |
@Nevay amazing, thank you for doing this. I have just tried it out and it's working as desired ❤️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey 👋
I wanted to propose additional functionality to prune any composer autoload files which become redundant if the
spi
plugin is allowed to run. I suspect that isn't always the case, but for certain packages we could remove the (usually minor) overhead of the autoload file which would otherwise be loaded at every runtime.A couple of examples which OpenTelemetry packages may benefit from:
I started an implementation which I was playing with as a proof-of-concept:
ChrisLightfootWild/opentelemetry-php@6125b71
However, it seems like behaviour which would make more sense to reside within the SPI package directly.
Thanks!
The text was updated successfully, but these errors were encountered: