Comments (9)
Hi @inverse
Do you have a plan in mind how you would like to support multiple versions of libraries for example? I know that guzzle exposes a constant with a version but the way I saw you init is based on class only and not considering other factors.
Proposals are welcomed of course, but this is the TL;DR version of what we were thinking to do:
- Each integration, e.g.
guzzle
would have a fileDDTrace\Integrations\Guzzle\GuzzleIntegration.php
which exposes a single method::load()
to be called to load the integration (1) - That method tries to guess the version based of any info it can have access to, e.g. a version file vs a class that exists or not
- Then it delegates the
load()
to the version-specific...\Vx\GuzzleIntegration.php
file (2)/(3).
DDTrace/
Integrations/
…
Guzzle/
V5/
GuzzleIntegration.php (2)
V6/
GuzzleIntegration.php (3)
GuzzleConfiguration.php // Optional
GuzzleIntegration.php (1)
…
IntegrationLoader.php
Configuration.php
Also for testing - I've not got any experience with this but have seen tools out there such as https://packagist.org/packages/g1a/composer-test-scenarios
The link that you provided seems very promising, and in fact we were looking for something similar to what we use in python tracer and this library seems to be the answer. Very good suggestion I believe.
from dd-trace-php.
Feel free to take it over :) I didn't get that far as I'm not able to work on this during work time and home life is another balancing act :) interested to see the implementation though :)
from dd-trace-php.
Hi @inverse, thanks for reporting this issue. We currently support (and tests) 5.x but we were aware of 6.x version that had to be addresses! Let me get back to you soon with an ETA. In the meantime if you have free cycles we would more than welcome a PR 😄
from dd-trace-php.
Totally would love to contribute to this! but not sure about free cycles right now.
Do you have a plan in mind how you would like to support multiple versions of libraries for example? I know that guzzle exposes a constant with a version but the way I saw you init is based on class only and not considering other factors.
Also for testing - I've not got any experience with this but have seen tools out there such as https://packagist.org/packages/g1a/composer-test-scenarios
Cheers for the feedback!
from dd-trace-php.
Hey @inverse, we may have some spare cycles to adopt the library you suggested in our tests. But I don't want to step over if you already did some work. Happy to merge/integrate in that case.
I played a few minutes with it and seems to be working very well.
from dd-trace-php.
@inverse just an heads-up, if you are curious you can follow this PR #203 that introduces the test scenarios
from dd-trace-php.
thanks @labbati 👍
from dd-trace-php.
@inverse I am closing this issue as Guzzle 6 support has been added, finally 😄
Feel free to re-open it if you experience any other problem.
Thanks again for your advice on using https://packagist.org/packages/g1a/composer-test-scenarios it definitely helped moving forward in supporting (and testing) multiple versions of the same integration.
from dd-trace-php.
@labbati that was quick! Will let the team involved in this know so that they can continue our integration.
from dd-trace-php.
Related Issues (20)
- [Feature] OpenAI integration HOT 1
- [Bug]: Segmentation fault when using fibers in php 8.1 HOT 7
- [Bug]: default value for sample_rate is wrong HOT 4
- [Feature] Symfony Messenger Integration HOT 1
- [Question] How to add tags to the `curl_exec` spans HOT 2
- HTTP PUT and PATCH Data and headers HOT 2
- [Bug]: Nested exceptions are not recorded in `Integration::setError()` HOT 2
- [Security] Medium Vulnerability rustix in tag 0.97.0 HOT 2
- [Bug]: ddappsec startup warnings HOT 9
- [Feature] CURL multi exec integration is lacking data in the APM view HOT 7
- [Bug]: PDO/PHPRedis client split by instance inconsistency HOT 1
- [Bug]: Segfault in dd_patched_zend_call_known_function HOT 3
- [Bug]: ddtrace overrides php error log permissions HOT 1
- [Documentation]: OTEL tracing HOT 8
- [Feature] Add JSON body items to http.request
- [Feature] Laravel Livewire 3 Support
- [Bug]: Standalone null Return Type for update_span_duration Causes Phan Parsing to Fail for PHP <8.2 HOT 1
- [Bug]: new operation `command_execution` HOT 3
- [Bug]: Memory leak in creating Tracer HOT 8
- [Bug]: 0.98.x tar.gz file size increased? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-php.