Commit graph

73 commits

Author SHA1 Message Date
Dave Shawley
7793a189a0
Fix issue extlinks configuration. 2021-07-20 17:38:37 -04:00
Dave Shawley
9054c729f5
Add some missing typing.
This doesn't completely appease pyright & mypy since I insist on calling
the sprockets.http.Application methods when guarded by isinstance()
checks.
2021-07-20 17:35:13 -04:00
Andrew Rabert
a47f121f6d
Merge pull request #9 from dave-shawley/support-timer
Add support for python-statsd alike timer method.
2021-07-20 10:22:25 -04:00
Dave Shawley
3b9b9ccb2f
Make sonar a little happier.
I really should have commented the `pass` lines...
2021-07-18 12:06:35 -04:00
Dave Shawley
65745010ad
Add datetime.timedelta support to timing. 2021-07-18 11:57:38 -04:00
Dave Shawley
1c6ba8f80e
Implement the python-statsd Timer interface. 2021-07-18 11:56:49 -04:00
Dave Shawley
3f0f46cd6d
Bump from Beta to Production.
I've been running this in production for a few months now without issue
so I'm calling it production ready.
2021-07-18 11:26:34 -04:00
Dave Shawley
2d0b20054c
Update dev toolchain. 2021-07-18 11:26:34 -04:00
Dave Shawley
75bb621784
Add Connector.timer.
This improves compatibility with python-statsd.
2021-07-18 11:26:34 -04:00
Dave Shawley
3291306305 0.1.0: Ready for beta. 2021-05-10 10:45:30 -04:00
Gavin M. Roy
0fbff9e19c
Merge pull request #7 from dave-shawley/sprockets-http
Detect sprockets.http and make use of it.
2021-05-10 10:24:33 -04:00
Dave Shawley
c7a3a834c0
Remove explicit sonar scan of PR.
I cannot for the life of me figure out how to get the sonar token to be
available in the PR.  Setting it in the project doesn't work for PRs
since tokens are not available to PRs run from forks.  Setting it in my
fork didn't work either.  It is available via codecov so /shrug
2021-05-10 07:47:56 -04:00
Dave Shawley
ea97d07341
Switch to manual sonarqube analysis.
AFAICT the automatic analysis does not wait for coverage reports to be
generated.
2021-05-10 07:22:18 -04:00
Dave Shawley
89d20a5f89
Remove unused variable in test. 2021-05-10 06:45:19 -04:00
Dave Shawley
ed67689fe2
Limit logging when disconnected.
Instead of logging a warning every time that the connection fails, only
log the first 100 of them, then log every 100th time thereafter.
2021-05-09 16:21:34 -04:00
Dave Shawley
a48453b70e
Add compatibility with sprockets.http. 2021-05-09 16:21:34 -04:00
Andrew Rabert
b823d3a521
Merge pull request #6 from dave-shawley/add-disable
Add $STATSD_ENABLED
2021-05-06 15:51:02 -04:00
Dave Shawley
235c7bde3c
Add support for disabling tornado connector. 2021-04-12 08:08:07 -04:00
Dave Shawley
a2695e4d1a
Enable badges. 2021-04-09 19:07:27 -04:00
Dave Shawley
5242245191 0.0.1: First alpha release 2021-04-08 11:51:40 -04:00
dave-shawley
cfd166c667
Merge pull request #4 from dave-shawley/release-time
Release time
2021-04-08 11:24:39 -04:00
Dave Shawley
6835e0fd2d
0.0.1: Trying out the release pipeline! 2021-04-08 08:12:48 -04:00
Dave Shawley
ea8d2363fe
Add build.yml
Roughly based on what @gmr did in sprockets-postgres... still not sure
if the explicit `if` guard is necessary.
2021-04-08 08:11:36 -04:00
Dave Shawley
f51870b2f9
Add minimal pyproject.toml.
cuz Tim Peters said so
2021-04-08 07:58:03 -04:00
Dave Shawley
2fb3646f0d
Changes recommended by twine and pypi.
Interestingly enough twine check does not seem to check classifiers for
correctness ... testpypi rejected my first upload :(
2021-04-08 07:56:40 -04:00
Dave Shawley
3a5196e68b
Add typing markers. 2021-04-08 07:26:14 -04:00
dave-shawley
6832ea8ee2
Update run-tests.yml
Guess that I don't need to do this explicitly ... who knew?!
2021-04-07 08:02:13 -04:00
dave-shawley
d7b4fc568b
Update run-tests.yml
Hopefully fix the `if` condition for sonar analysis
2021-04-07 07:55:43 -04:00
dave-shawley
a28f984c84
Merge pull request #3 from dave-shawley/add-sonar
Add sonarqube analysis
2021-04-07 07:50:16 -04:00
Dave Shawley
e35f903744
Update sonar upload to only run on main. 2021-04-07 07:44:04 -04:00
Dave Shawley
27c357f14a
Fix workflow syntax error... hopefully 2021-04-07 07:35:03 -04:00
Dave Shawley
4986aa2868
Add more detail in sonar-project.properties. 2021-04-07 07:29:45 -04:00
Dave Shawley
40708fa70c
Pass coverage.xml to sonar analysis.
Since the code doesn't contain any version specific stuff, we don't need
to combine coverage output files (thank $diety).
2021-04-07 07:27:30 -04:00
Dave Shawley
396f667598
Add docs badge. 2021-04-06 22:01:46 -04:00
Dave Shawley
4cb93c59d5
Add sonarqube badge. 2021-04-06 22:00:25 -04:00
Dave Shawley
9e44f0ef73
Add sonarqube properties file. 2021-04-06 21:54:15 -04:00
dave-shawley
a47442332c
Add sonar cloud into run-tests 2021-04-06 21:51:36 -04:00
dave-shawley
26e596172e
Merge pull request #2 from dave-shawley/add-rtd
Add readthedocs.org configuration
2021-04-06 21:31:16 -04:00
Dave Shawley
7b57fa9fa9
Try to fix codecov uploads... 2021-04-06 21:25:46 -04:00
Dave Shawley
5d7a6f6941
Integrate with readthedocs.org. 2021-04-06 08:08:01 -04:00
Ryan Mclean
a0e2ef1c19
Merge pull request #1 from sprockets/syn
Initial implementation
2021-04-05 14:06:12 -04:00
Dave Shawley
0d911fc3e2
Enable codecov upload. 2021-03-30 08:29:48 -04:00
Dave Shawley
5a52437857
Remove coverage from tox.ini.
This makes running in parallel work properly.
2021-03-30 08:10:24 -04:00
Dave Shawley
51e1f2ccae
Make type annotations safe for Python 3.7. 2021-03-30 08:09:53 -04:00
Dave Shawley
da95efa544
Move path prefixing into Connector.
This makes the low-level code a little more opinionated.  If there is a
good reason for making `timers`, `counters`, etc. optional, then we can
PR it into place.
2021-03-30 07:56:20 -04:00
Dave Shawley
0f0bae1199
Set upper bound on metrics queue size. 2021-03-30 07:22:22 -04:00
Dave Shawley
5c947d6798
Make docs a little cleaner. 2021-03-29 07:46:23 -04:00
Dave Shawley
2ecdee61c4
Clean up type annotations.
This almost makes mypy happy.  I did manage to step on a defect that
there really isn't a great workaround for so I resorted to disabling
typing there.

https://github.com/python/mypy/issues/2427
2021-03-29 07:46:12 -04:00
Dave Shawley
b84e52592d
Prefix management -- take two.
Agree with @aremm here ... instead of requiring contortions to run
without a prefix, let's just require that it is explicitly set to `None`
if you want to skip the prefix.  If you `prefix` isn't in the settings
explicitly, then use `$STATSD_PREFIX` if it is set; otherwise, try to
construct a prefix from service & environment, if that fails, then fail
hard in the initializer.
2021-03-24 08:10:07 -04:00
Dave Shawley
65df480421
Expose a more usable interface on the Connector.
@nvllsvm likes the interface that https://statsd.readthedocs.io/ exposes
and I agree.  I mimicked this interface on the lower-level Connector.  I
left the sprockets.mixins.metrics style on the tornado helpers for
compat reasons.  You can always use `self.statsd_connector.incr()` in
your request handlers if you prefer the other interface.
2021-03-24 07:41:06 -04:00