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

Handmade profil triggered by the SDK are enlisted by default. #53

Open
thomasdiluccio opened this issue Mar 12, 2021 · 2 comments
Open

Comments

@thomasdiluccio
Copy link
Contributor

Profiles triggered by custom code are enlisted by default. They cannot be unlisted. Tested with the v1.23.0 and the v1.25.0.

$this->blackfireClient = new Client();
$this->config = new Configuration();

or

$this->blackfireClient = new Client();
$this->config = (new Configuration())
    ->setMetadata('skip_timeline', 'true')
;

both lead to enlisted results.

@lolautruche
Copy link
Contributor

lolautruche commented Mar 18, 2021

I am able to reproduce with the following script:

require __DIR__.'/vendor/autoload.php';

$blackfireClient = new \Blackfire\Client();
$config = new \Blackfire\Profile\Configuration();
$config->setTitle('Test SDK issue');
$probe = $blackfireClient->createProbe($config);

sleep(2);
echo "Hello world!";

echo $blackfireClient->endProbe($probe)->getUrl()."\n";

The profile is expected not to be listed by default, but it actually is.

@lolautruche
Copy link
Contributor

However, when I add skip_timeline to true, the profile is first enlisted, but disappears a few seconds later (I am guessing that a consumer updates the profile afterwards):

<?php

require __DIR__.'/vendor/autoload.php';

$blackfireClient = new \Blackfire\Client();
$config = new \Blackfire\Profile\Configuration();
$config->setTitle('Test SDK issue');
$config->setMetadata('issue', 'https://github.com/blackfireio/php-sdk/issues/53');
$config->setMetadata('skip_timeline', 'true');
$probe = $blackfireClient->createProbe($config);

sleep(2);
echo "Hello world!\n";

echo $blackfireClient->endProbe($probe)->getUrl()."\n";

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