Comments (3)
Sounds reasonable to me.
Feel free to open a PR or if you feel like the contribution is non-trivial we can discuss the approach here.
from php-datadogstatsd.
Okay, so I have a candidate proposal that does not mess with the existing logic, but reorganizes it a bit, gets coverage of new code based upon that; I Hope it not too adventurous, and has some (separated commits) for other things that came up in solving this, but are entirely optional, and can be dropped.
https://github.com/Lewiscowles1986/php-datadogstatsd/tree/feature/injectable-transport
- Proposed code changes (minimal, interface based)
- Test fix (I was authoring on Windows, and it was a pain, I could not run tests. It's 2-liner)
- GitHub actions (until I'd fixed, I actually had a really slow feedback loop)
- Editor config and git attributes
- Proposed Documentation (words are hard, forgive me if it's not perfect).
- Update to support PHP 8.0 & 8.1 thanks to Yoast
Tests
- PHP 5.6 - PHP 8.1
- Linting, Code-Style
The actual guard portion of this, doesn't have to be owned by this repo. In the README.md I added a section with example to bypass the magic, re-using the Ipv4Udp transport that is part of this PR, so that an example of instrumenting the control I was looking for (bypassing the magic in current constructor) is available.
I'm not 💯 sure about the construct with single method interface, but felt that opening and closing the socket separately to the functionality; could make some future testing easier. I Also didn't want to open a long-lived socket (although the classes don't hint at that, the way they are used in one place enforces for-now).
The interfaces are pretty stripped-back to deal with PHP 5.6 minimum. Not sure where DataDog is going with that, but I think users would get a lot of benefit rolling up to only 7.4 & 8+ in a future release.
from php-datadogstatsd.
Thanks for the comprehensive work. For our record keeping, can you please update the PR description with everything you mentioned above?
Also thanks for including the fixes for php 8 + PHPUnit.
Ill leave the rest of my feedback in the PR itself.
from php-datadogstatsd.
Related Issues (20)
- Unable to set gauge to 0 HOT 1
- No COUNT method?
- Bools Tag values HOT 1
- Regression: `set()` no longer supports strings
- new release HOT 1
- ->event call's return varies based on whether UDP mode is being used
- Sample rate is affected by the locale HOT 2
- push to dogstatsd in openmetrics format
- Incompatible with upcoming PHP 8.2 release HOT 3
- Push to statsd happens in UDP which is leading to metrics being missed to reach StatsD HOT 6
- Tagged 1.5.6 as 0.5.6
- Incompatible with IPv6
- Link to Laravel Wrapper HOT 3
- Possible incompatibility with Datadog agent ( version 6 ) HOT 4
- typo in readme
- DNS support for UDP transport HOT 1
- BatchedDogStatsd static variables HOT 3
- It is possible to send empty events via UDP
- Depending on `error_log` may result in unseen errors HOT 10
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 php-datadogstatsd.