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

issue Profiler Argument #19

Open
tanguybernard opened this issue Sep 16, 2016 · 2 comments
Open

issue Profiler Argument #19

tanguybernard opened this issue Sep 16, 2016 · 2 comments

Comments

@tanguybernard
Copy link

Hello,
After installing SoclozMonitoringBundle, I encountered this error:
ContextErrorException: Catchable Fatal Error: Argument 2 passed to Socloz\MonitoringBundle\Listener\Profiler::__construct() must be an instance of Socloz\MonitoringBundle\Notify\StatsD\StatsDInterface, null given, called in /project/app/cache/dev/appDevDebugProjectContainer.php on line 5127 and defined in /project/vendor/socloz/monitoring-bundle/Listener/Profiler.php line 58

app/config/config/yml

socloz_monitoring:
    exceptions:
        enable: true
    profiler:
        enable: true
        request: true
    mailer:
        enable: true
        from: [email protected]
        to: [email protected]
    statsd:
        enable: false
        host: nowhere
        port: 42
        merge_packets: true

Did I forget something ?

I would like to know execution time of my rest api in production. And other stats of functions.

Thanks in advance.

Tanguy

@mhor
Copy link
Member

mhor commented Sep 19, 2016

Hi @tanguybernard could you try to replace (https://github.com/SoCloz/SoclozMonitoringBundle/blob/master/Listener/Profiler.php#L58):

public function __construct(Xhprof $profiler, StatsDInterface $statsd, Logger $logger = null, $sampling = 100)

by:

public function __construct(Xhprof $profiler, StatsDInterface $statsd = null, Logger $logger = null, $sampling = 100)

If it's solve your problem could you do a pull request.

@tanguybernard
Copy link
Author

Thanks @mhor !
It's solved my problem.

One more question :) I expected a new element in my profiler symfony with this configuration:

profiler:
    enable: true
    sampling: 50
    request: true

But nothing appears, did I miss something ?

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

No branches or pull requests

2 participants