open-telemetry / opentelemetry-php

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

[symfony-auto-instrumentation] Split package into different packages #1365

Open joaojacome opened 2 months ago

joaojacome commented 2 months ago

Due to the possibility of using Symfony components on non-Symfony projects, I'd like to propose splitting the current Symfony Auto-instrumentation package into three different packages:

The existing opentelemetry-auto-symfony would become a meta-package for the new packages.

This will allow us to selectively enable those instrumentations.

brettmc commented 2 months ago

If the main goal is to be able to enable/disable different parts of the auto-instrumentation, then does it help to know that https://github.com/open-telemetry/opentelemetry-configuration/pull/91 is coming, which will allow fine-grained configuration of auto-instrumentation? Once we get v1.1 tagged of our core packages, we plan to move auto-instrumentation packages across to supporting this type of configuration. There's an example of how this works: https://github.com/open-telemetry/opentelemetry-php/tree/main/examples/src

joaojacome commented 2 months ago

Looks like that would work too, I'm happy with that :)

Although, I still think the Symfony packages should be split in different packages, as they actually instrument different components.

dkarlovi commented 1 month ago

IMO splitting the packages too much creates too much overhead, configuration is preferable.

Symfony itself uses Framework bundle as a catch all instrumentation for a bunch of components, not each component gets a dedicated bundle. I don't see why OTEL instrumentation wouldn't do the same.