sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

Docs regarding Transports are not correct

Open cbclicer opened this issue 4 years ago • 6 comments

https://docs.sentry.io/platforms/php/configuration/transports/ seems quite wrong instructions for v3.2.2...

cbclicer avatar Jun 09 '21 14:06 cbclicer

Can you specify which part?

Jean85 avatar Jun 10 '21 16:06 Jean85

Everything! We could't make it run with this section and had to recode quite everything. The docs seem to be OK for Version 2 but NOT version 3 of php SDK.

Example:

Does not work with V3:

$httpClientFactory = new HttpClientFactory(
    UriFactoryDiscovery::find(),
    MessageFactoryDiscovery::find(),
    StreamFactoryDiscovery::find(),
    HttpAsyncClientDiscovery::find(),
    'sentry.php',
    '3.3'
);

This code works:

$httpClientFactory = new HttpClientFactory(
    Psr17FactoryDiscovery::findUriFactory(),
    Psr17FactoryDiscovery::findResponseFactory(),
    Psr17FactoryDiscovery::findStreamFactory(),
    HttpAsyncClientDiscovery::find(),
    'sentry.php',
    '3.3'
);

OR

return new HttpTransport($options, $this->clientFactory->create($options),
                        MessageFactoryDiscovery::find());

should be something like this

return new HttpTransport(
    $options,
    $this->clientFactory->create($options),
    Psr17FactoryDiscovery::findStreamFactory(),
    Psr17FactoryDiscovery::findRequestFactory(),
    new PayloadSerializer(),
);

cbclicer avatar Jun 11 '21 08:06 cbclicer

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jan 12 '22 21:01 github-actions[bot]

Doc seems to have been updated. Is it fine now?

Jean85 avatar Jan 12 '22 23:01 Jean85

AFAICT this still needs to be fixed. The documentation was last updated the day before this issue was filed: https://github.com/getsentry/sentry-docs/commits/master/src/platforms/php/common/configuration/transports.mdx

mfb avatar Jan 12 '22 23:01 mfb

@Jean85 AFAICT this is still not correct and all info is version for 2.x => https://docs.sentry.io/platforms/php/configuration/transports/

cbclicer avatar Jan 12 '22 23:01 cbclicer

Version 4 of the PHP SDK did change the entire HTTP client implementation. Closing, as no longer needed.

cleptric avatar Mar 04 '24 22:03 cleptric