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

Errors after fresh installation 1.0.0-alpha #119

Closed
Kaspiman opened this issue Jan 22, 2025 · 7 comments · Fixed by #122
Closed

Errors after fresh installation 1.0.0-alpha #119

Kaspiman opened this issue Jan 22, 2025 · 7 comments · Fixed by #122
Assignees

Comments

@Kaspiman
Copy link
Contributor

/service # bin/console c:c

In MailerInstrumentationPass.php line 20:
                                                                                                 
  Mailer instrumentation cannot be enabled because the symfony/mailer package is not installed.  
                                                                                                 

Then i disable MailerInstrumentationPass.php.

/service # bin/console c:c

In AbstractRecursivePass.php line 177:
                                                                                                                                                                                   
  Invalid service "open_telemetry.instrumentation.doctrine.trace.middleware": class "Doctrine\DBAL\Driver\Middleware" not found while loading "FriendsOfOpenTelemetry\OpenTeleme   
  tryBundle\Instrumentation\Doctrine\Middleware\TraceableMiddleware".       

Then i disable TraceableMiddleware:

/service # bin/console c:c

In AbstractRecursivePass.php line 177:
                                                                                                                                                                                   
  Invalid service "open_telemetry.instrumentation.mailer.trace.transports": class "Symfony\Component\Mailer\Transport\TransportInterface" not found while loading "FriendsOfOpen   
  Telemetry\OpenTelemetryBundle\Instrumentation\Symfony\Mailer\TraceableMailerTransport".  

Looks like we need load only available services at all, like i did here.

@gaelreyrol gaelreyrol self-assigned this Jan 22, 2025
@gaelreyrol
Copy link
Contributor

Hi @Kaspiman, I am sorry to see that my changes seems to not have the desired behavior.

When you say:

Then i disable MailerInstrumentationPass.php.
Then i disable TraceableMiddleware:

How did you do that? Did you disabled the instrumentation from the configuration or did you just removed the compiler passes from the extension?

@Kaspiman
Copy link
Contributor Author

I just remove CompilerPass or comment some code from vendor folder, then clear cache.

@Kaspiman
Copy link
Contributor Author

Instrumentations that are obviously inaccessible should not be placed in the container. Now they go into the container and then we try to remove them.

@gaelreyrol
Copy link
Contributor

Well, it seems that I miss configured some checks within the compiler passes. I will fix this ASAP.

@gaelreyrol
Copy link
Contributor

This should be fixed with the next pre-release version v1.0.0-alpha.1.

@Kaspiman
Copy link
Contributor Author

Kaspiman commented Jan 24, 2025

@gaelreyrol

  Invalid service "open_telemetry.instrumentation.doctrine.trace.middleware": class "Doctrine\DBAL\Driver\Middleware" not found while loading "FriendsOfOpenTelemetry\OpenTeleme   
  tryBundle\Instrumentation\Doctrine\Middleware\TraceableMiddleware".  

already here because

->set('open_telemetry.instrumentation.doctrine.trace.middleware', TraceableDoctrineMiddleware::class)
always instantiate class with Doctrine\DBAL\Driver dependency

@gaelreyrol
Copy link
Contributor

@Kaspiman Thanks, it is not easy to test these cases. I changed how services are defined, please see #124.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants