Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Bump black from 23.10.1 to 24.2.0 (#16936) | dependabot[bot] | 2024-03-13 | 1 | -4/+2 |
| | |||||
* | Correctly mention previous copyright (#16820) | Erik Johnston | 2024-01-23 | 7 | -0/+9 |
| | | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them. | ||||
* | Update license headers | Patrick Cloke | 2023-11-21 | 8 | -82/+128 |
| | |||||
* | Support reactor timing metric on more reactors. (#16532) | Patrick Cloke | 2023-11-06 | 1 | -27/+103 |
| | | | | | | | | | | Previously only Twisted's EPollReactor was compatible with the reactor timing metric, notably not working when asyncio was used. After this change, the following configurations support the reactor timing metric: * poll, epoll, or select reactors * asyncio reactor with a poll, epoll, select, /dev/poll, or kqueue event loop. | ||||
* | Only use literal strings for process names (#16315) | Erik Johnston | 2023-09-15 | 1 | -2/+5 |
| | |||||
* | Remove a reference cycle in background process (#16314) | Erik Johnston | 2023-09-13 | 1 | -1/+20 |
| | |||||
* | Use StrCollection in additional places. (#16301) | Patrick Cloke | 2023-09-13 | 1 | -4/+4 |
| | |||||
* | Quick & dirty metric for background update status (#15740) | David Robertson | 2023-06-07 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | * Quick & dirty metric for background update status * Changelog * Remove debug Co-authored-by: Mathieu Velten <mathieuv@matrix.org> * Actually write to _aborted --------- Co-authored-by: Mathieu Velten <mathieuv@matrix.org> | ||||
* | Bump black from 22.12.0 to 23.1.0 (#15103) | dependabot[bot] | 2023-02-22 | 2 | -2/+0 |
| | |||||
* | Fix logging context warnings due to common usage metrics setup (#14574) | Sean Quah | 2022-11-28 | 1 | -1/+3 |
| | | | | | | | | | `setup()` is run under the sentinel context manager, so we wrap the initial update in a background process. Before this change, Synapse would log two warnings on startup: Starting db txn 'count_daily_users' from sentinel context Starting db connection from sentinel context: metrics will be lost Signed-off-by: Sean Quah <seanq@matrix.org> | ||||
* | Remove legacy Prometheus metrics names. They were deprecated in Synapse ↵ | reivilibre | 2022-11-24 | 3 | -294/+39 |
| | | | | v1.69.0 and disabled by default in Synapse v1.71.0. (#14538) | ||||
* | Avoid incrementing bg process utime/stime counters by negative durations ↵ | David Robertson | 2022-10-31 | 1 | -2/+4 |
| | | | | (#14323) | ||||
* | Catch BrokenPipeError from metrics server, and log as a warning (#14072) | David Robertson | 2022-10-07 | 1 | -6/+12 |
| | |||||
* | Fix cache metrics not being updated when not using the legacy exposition ↵ | reivilibre | 2022-09-08 | 1 | -7/+0 |
| | | | | module. (#13717) | ||||
* | Fix Prometheus recording rules to not use legacy metric names. (#13718) | reivilibre | 2022-09-08 | 1 | -0/+5 |
| | |||||
* | Update Grafana dashboard to not use legacy metric names. (#13714) | reivilibre | 2022-09-06 | 1 | -2/+2 |
| | |||||
* | Share some metrics between the Prometheus exporter and the phone home stats ↵ | Brendan Abolivier | 2022-09-05 | 1 | -0/+79 |
| | | | | (#13671) | ||||
* | Add experimental configuration option to allow disabling legacy Prometheus ↵ | reivilibre | 2022-08-24 | 2 | -8/+30 |
| | | | | | metric names. (#13540) Co-authored-by: David Robertson <davidr@element.io> | ||||
* | Add missing types to opentracing. (#13345) | Patrick Cloke | 2022-07-21 | 1 | -1/+1 |
| | | | After this change `synapse.logging` is fully typed. | ||||
* | Fix Synapse git info missing in version strings (#12973) | David Robertson | 2022-06-07 | 1 | -2/+2 |
| | |||||
* | Easy type hints in synapse.logging.opentracing (#12894) | David Robertson | 2022-05-27 | 1 | -6/+3 |
| | |||||
* | Add config flags to allow for cache auto-tuning (#12701) | Shay | 2022-05-13 | 1 | -41/+73 |
| | |||||
* | Update mypy to 0.950 and fix complaints (#12650) | David Robertson | 2022-05-06 | 1 | -10/+34 |
| | |||||
* | Update type annotations for compatiblity with prometheus_client 0.14 (#12389) | Richard van der Hoff | 2022-04-06 | 6 | -15/+65 |
| | | | | | | | Principally, `prometheus_client.REGISTRY.register` now requires its argument to extend `prometheus_client.Collector`. Additionally, `Gauge.set` is now annotated so that passing `Optional[int]` causes an error. | ||||
* | Use version string helper from matrix-common (#11979) | David Robertson | 2022-02-14 | 1 | -3/+4 |
| | | | | * Require latest matrix-common * Use the common function | ||||
* | Fix type errors introduced by new annotations in the Prometheus Client ↵ | reivilibre | 2022-02-02 | 1 | -1/+9 |
| | | | | | library. (#11832) Co-authored-by: David Robertson <davidr@element.io> | ||||
* | Fix mypy for platforms without epoll support. (#11771) | Patrick Cloke | 2022-01-19 | 1 | -2/+2 |
| | |||||
* | Improve `reactor_tick_time` metric (#11724) | Richard van der Hoff | 2022-01-17 | 2 | -93/+84 |
| | | | | | | | | | | | The existing implementation of the `python_twisted_reactor_tick_time` metric is pretty useless, because it *only* measures the time taken to execute timed calls and callbacks from threads. That neglects everything that happens off the back of I/O, which is obviously quite a lot for us. To improve this, I've hooked into a different place in the reactor - in particular, where it calls `epoll`. That call is the only place it should wait for something to happen - the rest of the loop *should* be quick. I've also removed `python_twisted_reactor_pending_calls`, because I don't believe anyone ever looks at it, and it's a nuisance to populate. | ||||
* | Simplify GC prometheus metrics (#11723) | Richard van der Hoff | 2022-01-13 | 2 | -159/+206 |
| | | | | | Rather than hooking into the reactor loop, just add a timed task that runs every 100 ms to do the garbage collection. Part 1 of a quest to simplify the reactor monkey-patching. | ||||
* | Use auto_attribs/native type hints for attrs classes. (#11692) | Patrick Cloke | 2022-01-13 | 1 | -10/+10 |
| | |||||
* | Add type annotations to `synapse.metrics` (#10847) | Sean Quah | 2021-11-17 | 4 | -71/+152 |
| | |||||
* | Add metrics to the threadpools (#11178) | Erik Johnston | 2021-11-01 | 1 | -0/+37 |
| | |||||
* | Type hints for the remaining two files in `synapse.http`. (#11164) | David Robertson | 2021-10-28 | 1 | -5/+9 |
| | | | | | | | | | | | | | | | | | | | * Teach MyPy that the sentinel context is False This means that if `ctx: LoggingContextOrSentinel` then `bool(ctx)` narrows us to `ctx:LoggingContext`, which is a really neat find! * Annotate RequestMetrics - Raise errors for sentry if we use the sentinel context - Ensure we don't raise an error and carry on, but not recording stats - Include stack trace in the error case to lower Sean's blood pressure * Make mypy pass for synapse.http.request_metrics * Make synapse.http.connectproxyclient pass mypy Co-authored-by: reivilibre <oliverw@matrix.org> | ||||
* | Relax `ignore-missing-imports` for modules that have stubs now and update ↵ | David Robertson | 2021-10-08 | 1 | -1/+1 |
| | | | | | | | | | | | | mypy (#11006) Updating mypy past version 0.9 means that third-party stubs are no-longer distributed with typeshed. See http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html for details. We therefore pull in stub packages in setup.py Additionally, some modules that we were previously ignoring import failures for now have stubs. So let's use them. The rest of this change consists of fixups to make the newer mypy + stubs pass CI. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | [pyupgrade] `synapse/` (#10348) | Jonathan de Jong | 2021-07-19 | 2 | -16/+13 |
| | | | | | | | | | This PR is tantamount to running ``` pyupgrade --py36-plus --keep-percent-format `find synapse/ -type f -name "*.py"` ``` Part of #9744 | ||||
* | Use inline type hints in various other places (in `synapse/`) (#10380) | Jonathan de Jong | 2021-07-15 | 3 | -6/+6 |
| | |||||
* | opentracing: use a consistent name for background processes (#10135) | Richard van der Hoff | 2021-06-07 | 1 | -2/+3 |
| | | | | ... otherwise we tend to get a namespace clash between the bg process and the functions that it calls. | ||||
* | Set opentracing priority before setting other tags (#10092) | Richard van der Hoff | 2021-05-28 | 1 | -2/+8 |
| | | | ... because tags on spans which aren't being sampled get thrown away. | ||||
* | Export jemalloc stats to prometheus when used (#9882) | Erik Johnston | 2021-05-06 | 2 | -0/+197 |
| | |||||
* | Limit how often GC happens by time. (#9902) | Erik Johnston | 2021-05-05 | 1 | -2/+16 |
| | | | | | | | | | | | | | | | Synapse can be quite memory intensive, and unless care is taken to tune the GC thresholds it can end up thrashing, causing noticable performance problems for large servers. We fix this by limiting how often we GC a given generation, regardless of current counts/thresholds. This does not help with the reverse problem where the thresholds are set too high, but that should only happen in situations where they've been manually configured. Adds a `gc_min_seconds_between` config option to override the defaults. Fixes #9890. | ||||
* | Merge branch 'master' into develop | Andrew Morgan | 2021-04-21 | 1 | -4/+16 |
|\ | |||||
| * | Stop BackgroundProcessLoggingContext making new prometheus timeseries (#9854) | Richard van der Hoff | 2021-04-21 | 1 | -4/+16 |
| | | | | | | | | This undoes part of b076bc276e881b262048307b6a226061d96c4a8d. | ||||
* | | Merge branch 'master' into develop | Andrew Morgan | 2021-04-20 | 1 | -11/+4 |
|\| | |||||
| * | Always use the name as the log ID. (#9829) | Patrick Cloke | 2021-04-20 | 1 | -11/+4 |
| | | | | | | | | | | As far as I can tell our logging contexts are meant to log the request ID, or sometimes the request ID followed by a suffix (this is generally stored in the name field of LoggingContext). There's also code to log the name@memory location, but I'm not sure this is ever used. This simplifies the code paths to require every logging context to have a name and use that in logging. For sub-contexts (created via nested_logging_contexts, defer_to_threadpool, Measure) we use the current context's str (which becomes their name or the string "sentinel") and then potentially modify that (e.g. add a suffix). | ||||
* | | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 3 | -3/+0 |
|/ | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Record more information into structured logs. (#9654) | Patrick Cloke | 2021-04-08 | 1 | -6/+12 |
| | | | | Records additional request information into the structured logs, e.g. the requester, IP address, etc. | ||||
* | Don't report anything from GaugeBucketCollector metrics until data is ↵ | Andrew Morgan | 2021-04-06 | 1 | -3/+13 |
| | | | | | present (#8926) This PR modifies `GaugeBucketCollector` to only report data once it has been updated, rather than initially reporting a value of 0. Fixes zero values being reported for some metrics on startup until a background job to update the metric's value runs later. | ||||
* | Fix additional type hints from Twisted upgrade. (#9518) | Patrick Cloke | 2021-03-03 | 1 | -5/+6 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 3 | -9/+9 |
| | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version | ||||
* | Various clean-ups to the logging context code (#8935) | Patrick Cloke | 2020-12-14 | 1 | -4/+3 |
| | |||||
* | Allow spam-checker modules to be provide async methods. (#8890) | David Teller | 2020-12-11 | 1 | -7/+2 |
| | | | | Spam checker modules can now provide async methods. This is implemented in a backwards-compatible manner. | ||||
* | Add metrics for tracking 3PID /requestToken requests. (#8712) | Erik Johnston | 2020-11-13 | 1 | -0/+10 |
| | | | | | | The main use case is to see how many requests are being made, and how many are second/third/etc attempts. If there are large number of retries then that likely indicates a delivery problem. | ||||
* | Start fewer opentracing spans (#8640) | Erik Johnston | 2020-10-26 | 1 | -3/+9 |
| | | | | | | | #8567 started a span for every background process. This is good as it means all Synapse code that gets run should be in a span (unless in the sentinel logging context), but it means we generate about 15x the number of spans as we did previously. This PR attempts to reduce that number by a) not starting one for send commands to Redis, and b) deferring starting background processes until after we're sure they're necessary. I don't really know how much this will help. | ||||
* | Fix typos and spelling errors. (#8639) | Patrick Cloke | 2020-10-23 | 1 | -1/+1 |
| | |||||
* | Start an opentracing span for background processes. (#8567) | Erik Johnston | 2020-10-19 | 1 | -5/+6 |
| | | | | | | This should reduce the number of `There was no active span` errors we see. Fixes #8510. | ||||
* | Rewrite BucketCollector | Richard van der Hoff | 2020-09-30 | 1 | -47/+68 |
| | | | | | | | | | | | | This was a bit unweildy for what I wanted: in particular, I wanted to assign each measurement straight into a bucket, rather than storing an intermediate Counter which didn't do any bucketing at all. I've replaced it with something that is hopefully a bit easier to use. (I'm not entirely sure what the difference between a HistogramMetricFamily and a GaugeHistogramMetricFamily is, but given our counters can go down as well as up the latter *sounds* more accurate?) | ||||
* | Fix _exposition.py to stop stripping samples | Richard van der Hoff | 2020-09-30 | 1 | -11/+29 |
| | | | | | | Our hacked-up `_exposition.py` was stripping out some samples it shouldn't have been. Put them back in, to more closely match the upstream `exposition.py`. | ||||
* | Drop support for ancient prometheus_client (#8426) | Richard van der Hoff | 2020-09-30 | 1 | -22/+2 |
| | | | | Drop compatibility hacks for prometheus-client pre 0.4.0. Debian stretch and Fedora 31 both have newer versions, so hopefully this will be ok. | ||||
* | Use slots in attrs classes where possible (#8296) | Patrick Cloke | 2020-09-14 | 1 | -2/+2 |
| | | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 2 | -10/+10 |
| | |||||
* | Convert runWithConnection to async. (#8121) | Patrick Cloke | 2020-08-19 | 1 | -1/+1 |
| | |||||
* | Convert run_as_background_process inner function to async. (#8032) | Patrick Cloke | 2020-08-06 | 1 | -22/+12 |
| | |||||
* | Improve stacktraces from exceptions in background processes (#7808) | Richard van der Hoff | 2020-07-09 | 1 | -1/+9 |
| | | | use `Failure()` to fish out the real exception. | ||||
* | Add some metrics for inbound and outbound federation processing times (#7755) | Erik Johnston | 2020-06-30 | 1 | -0/+6 |
| | |||||
* | Set Content-Length for Metrics requests (#7730) | Christian Svensson | 2020-06-23 | 1 | -1/+4 |
| | | | | | | HTTP requires the response to contain a Content-Length header unless chunked encoding is being used. Prometheus metrics endpoint did not set this, causing software such as prometheus-proxy to not be able to scrape synapse for metrics. Signed-off-by: Christian Svensson <blue@cmd.nu> | ||||
* | Replace iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 1 | -4/+2 |
| | |||||
* | Make inflight background metrics more efficient. (#7597) | Erik Johnston | 2020-05-29 | 1 | -34/+70 |
| | | | Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | ||||
* | synapse.metrics: implement detailed memory usage reporting on PyPy (#7536) | Ivan Shapovalov | 2020-05-22 | 1 | -1/+78 |
| | | | | | | PyPy's gc.get_stats() returns an object containing detailed allocator statistics which could be beneficial to collect as metrics. Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name> | ||||
* | Allow configuration of Synapse's cache without using synctl or environment ↵ | Amber Brown | 2020-05-11 | 1 | -4/+8 |
| | | | | variables (#6391) | ||||
* | Add prometheus metrics for the number of active pushers (#7103) | Richard van der Hoff | 2020-03-19 | 2 | -7/+10 |
| | |||||
* | Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) | Patrick Cloke | 2020-02-21 | 2 | -3/+3 |
| | | | | Ensure good comprehension hygiene using flake8-comprehensions. | ||||
* | Fix up some typechecking (#6150) | Amber Brown | 2019-10-02 | 2 | -4/+4 |
| | | | | | | * type checking fixes * changelog | ||||
* | Update comments and docstring | Richard van der Hoff | 2019-09-25 | 1 | -4/+6 |
| | |||||
* | Add wrap_as_background_process decorator. | Erik Johnston | 2019-09-24 | 1 | -1/+28 |
| | | | | | This does the same thing as `run_as_background_process` but means we don't need to create superfluous functions. | ||||
* | Fix for structured logging tests stomping on logs (#6023) | Amber Brown | 2019-09-13 | 2 | -4/+5 |
| | |||||
* | Add a build info metric to Prometheus (#6005) | Amber Brown | 2019-09-10 | 1 | -0/+12 |
| | |||||
* | Support Prometheus_client 0.4.0+ (#5636) | Amber Brown | 2019-07-18 | 3 | -20/+275 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
| | |||||
* | Don't log GC 0s at INFO (#5557) | Amber Brown | 2019-06-28 | 1 | -1/+4 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 2 | -22/+18 |
| | |||||
* | Prometheus histograms are cumalative | Erik Johnston | 2019-06-14 | 1 | -1/+0 |
| | |||||
* | fix prometheus rendering error | Amber H. Brown | 2019-06-14 | 1 | -1/+1 |
| | |||||
* | Expose statistics on extrems to prometheus (#5384) | Amber Brown | 2019-06-13 | 1 | -20/+92 |
| | |||||
* | Add metrics for number of outgoing EDUs, by type (#4695) | Richard van der Hoff | 2019-02-20 | 1 | -2/+0 |
| | |||||
* | Fix exception in background metrics collection | Erik Johnston | 2018-10-03 | 1 | -2/+6 |
| | | | | | We attempted to iterate through a list on a separate thread without doing the necessary copying. | ||||
* | Add missing logger | Erik Johnston | 2018-09-20 | 1 | -0/+4 |
| | |||||
* | Handle exceptions thrown by background tasks | Erik Johnston | 2018-09-20 | 1 | -0/+2 |
| | | | | Fixes #3921 | ||||
* | Remove spurious comment | Erik Johnston | 2018-09-14 | 1 | -2/+0 |
| | |||||
* | Add in flight real time metrics for Measure blocks | Erik Johnston | 2018-09-14 | 1 | -1/+109 |
| | |||||
* | isort | Erik Johnston | 2018-08-21 | 1 | -1/+2 |
| | |||||
* | Make the in flight background process metrics thread safe | Erik Johnston | 2018-08-20 | 1 | -5/+20 |
| | |||||
* | fix metric name | Richard van der Hoff | 2018-08-07 | 1 | -1/+1 |
| | |||||
* | more metrics for the federation and appservice senders | Richard van der Hoff | 2018-08-07 | 1 | -0/+13 |
| | |||||
* | Fix some looping_call calls which were broken in #3604 | Richard van der Hoff | 2018-07-26 | 1 | -2/+8 |
| | | | | | | | | | It turns out that looping_call does check the deferred returned by its callback, and (at least in the case of client_ips), we were relying on this, and I broke it in #3604. Update run_as_background_process to return the deferred, and make sure we return it to clock.looping_call. | ||||
* | Resource tracking for background processes | Richard van der Hoff | 2018-07-18 | 1 | -0/+179 |
| | | | | | | | | | | | | | | | | This introduces a mechanism for tracking resource usage by background processes, along with an example of how it will be used. This will help address #3518, but more importantly will give us better insights into things which are happening but not being shown up by the request metrics. We *could* do this with Measure blocks, but: - I think having them pulled out as a completely separate metric class will make it easier to distinguish top-level processes from those which are nested. - I want to be able to report on in-flight background processes, and I don't think we want to do this for *all* Measure blocks. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -6/+5 |
| | |||||
* | Attempt to be more performant on PyPy (#3462) | Amber Brown | 2018-06-28 | 1 | -1/+2 |
| | |||||
* | Fix description of "python_gc_time" metric | Richard van der Hoff | 2018-06-21 | 1 | -1/+1 |
| | |||||
* | spell gauge correctly | Matthew Hodgson | 2018-06-16 | 1 | -1/+1 |
| | |||||
* | add a last seen metric (#3396) | Amber Brown | 2018-06-14 | 1 | -0/+21 |
| | |||||
* | Hopefully, fix LaterGuage error handling | Richard van der Hoff | 2018-06-04 | 1 | -3/+6 |
| | |||||
* | Run Prometheus on a different port, optionally. (#3274) | Amber Brown | 2018-05-31 | 2 | -1/+6 |
| | |||||
* | pep8 | Matthew Hodgson | 2018-05-29 | 1 | -0/+1 |
| | |||||
* | disable CPUMetrics if no /proc/self/stat | Matthew Hodgson | 2018-05-29 | 1 | -0/+3 |
| | | | | fixes build on macOS again | ||||
* | invalid syntax :( | Amber Brown | 2018-05-28 | 1 | -2/+1 |
| | |||||
* | update metrics to be in seconds | Amber Brown | 2018-05-28 | 1 | -9/+10 |
| | |||||
* | pepeightttt | Amber Brown | 2018-05-23 | 1 | -0/+1 |
| | |||||
* | add back CPU metrics | Amber Brown | 2018-05-23 | 1 | -1/+35 |
| | |||||
* | more cleanup | Amber Brown | 2018-05-22 | 1 | -3/+1 |
| | |||||
* | cleanup | Amber Brown | 2018-05-22 | 1 | -6/+22 |
| | |||||
* | fixes | Amber Brown | 2018-05-22 | 1 | -2/+10 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into 3218-official-prom | Amber Brown | 2018-05-22 | 1 | -1/+5 |
|\ | |||||
* | | replacing portions | Amber Brown | 2018-05-21 | 1 | -119/+63 |
| | | |||||
* | | don't need the resource portion | Amber Brown | 2018-05-21 | 1 | -23/+0 |
| | | |||||
* | | remove old metrics libs | Amber Brown | 2018-05-21 | 2 | -450/+0 |
|/ | |||||
* | Note that label values can be anything | Erik Johnston | 2018-05-03 | 1 | -1/+2 |
| | |||||
* | Fix metrics that have integer value labels | Erik Johnston | 2018-05-03 | 1 | -1/+1 |
| | |||||
* | Make _escape_character take MatchObject | Erik Johnston | 2018-05-02 | 1 | -2/+10 |
| | |||||
* | Escape label values in prometheus metrics | Erik Johnston | 2018-05-02 | 1 | -2/+20 |
| | |||||
* | s/list/tuple | Erik Johnston | 2018-04-12 | 1 | -2/+2 |
| | |||||
* | Track last processed event received_ts | Erik Johnston | 2018-04-11 | 1 | -0/+13 |
| | |||||
* | Track where event stream processing have gotten up to | Erik Johnston | 2018-04-11 | 1 | -0/+13 |
| | |||||
* | Add GaugeMetric | Erik Johnston | 2018-04-11 | 2 | -1/+38 |
| | |||||
* | Don't disable GC when running on PyPy | Vincent Breitmoser | 2018-04-10 | 1 | -1/+7 |
| | | | | | | | | PyPy's incminimark GC can't be triggered manually. From what I observed there are no obvious issues with just letting it run normally. And unlike CPython, it actually returns unused RAM to the system. Signed-off-by: Vincent Breitmoser <look@my.amazin.horse> | ||||
* | Add a metric which increments when a request is received | Richard van der Hoff | 2018-03-09 | 1 | -0/+16 |
| | | | | | | It's useful to know when there are peaks in incoming requests - which isn't quite the same as there being peaks in outgoing responses, due to the time taken to handle requests. | ||||
* | report metrics on number of cache evictions | Richard van der Hoff | 2018-02-05 | 1 | -1/+10 |
| | |||||
* | Add some comments about the reactor tick time metric | Richard van der Hoff | 2018-01-19 | 1 | -1/+6 |
| | |||||
* | better exception logging in callbackmetrics | Richard van der Hoff | 2018-01-18 | 1 | -1/+8 |
| | | | | when we fail to render a metric, give a clue as to which metric it was | ||||
* | mechanism to render metrics with alternative names | Richard van der Hoff | 2018-01-15 | 1 | -13/+40 |
| | |||||
* | Add some comments to metrics classes | Richard van der Hoff | 2018-01-15 | 1 | -1/+27 |
| | |||||
* | Make Counter render floats | Richard van der Hoff | 2018-01-12 | 1 | -3/+10 |
| | | | | | | | | Prometheus handles all metrics as floats, and sometimes we store non-integer values in them (notably, durations in seconds), so let's render them as floats too. (Note that the standard client libraries also treat Counters as floats.) | ||||
* | Rename the python-specific metrics now the docs claim that we have done | Paul "LeoNerd" Evans | 2016-11-03 | 1 | -7/+9 |
| | |||||
* | Since we don't export per-filetype fd counts any more, delete all the code ↵ | Paul "LeoNerd" Evans | 2016-11-03 | 1 | -36/+4 |
| | | | | related to that too | ||||
* | Remove now-unused 'resource' import | Paul "LeoNerd" Evans | 2016-11-03 | 1 | -8/+0 |
| | |||||
* | Now we have new-style metrics don't bother exporting legacy-named process ones | Paul "LeoNerd" Evans | 2016-11-03 | 1 | -16/+1 |
| | |||||
* | Set up the process collector during metrics __init__; that way all ↵ | Paul "LeoNerd" Evans | 2016-10-27 | 1 | -0/+3 |
| | | | | split-process workers have it | ||||
* | Pass the Metrics group into the process collector instead of having it find ↵ | Paul "LeoNerd" Evans | 2016-10-27 | 1 | -7/+3 |
| | | | | its own one; this avoids it needing to import from synapse.metrics | ||||
* | Allow creation of a 'subspace' within a Metrics object, returning another one | Paul "LeoNerd" Evans | 2016-10-27 | 1 | -0/+3 |
| | |||||
* | Split callback metric lambda functions down onto their own lines to keep ↵ | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -8/+16 |
| | | | | line lengths under 90 | ||||
* | Adjust code for <100 char line limit | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -1/+1 |
| | |||||
* | Cut the raw /proc/self/stat line up into named fields at collection time | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -8/+22 |
| | |||||
* | Move the process metrics collector code into its own file | Paul "LeoNerd" Evans | 2016-10-19 | 2 | -141/+159 |
| | |||||
* | A slightly neater way to manage metric collector functions | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -2/+8 |
| | |||||
* | appease pep8 | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -3/+5 |
| | |||||
* | Also guard /proc/self/fds-related code with a suitable psuedoconstant | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -3/+5 |
| | |||||
* | Guard registration of process-wide metrics by existence of the requisite ↵ | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -45/+50 |
| | | | | /proc entries | ||||
* | Add standard process_start_time_seconds metric | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -0/+15 |
| | |||||
* | Add standard process_max_fds metric | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -0/+13 |
| | |||||
* | Add standard process_open_fds metric | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -20/+29 |
| | |||||
* | Add standard process_*_memory_bytes metrics | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -0/+8 |
| | |||||
* | Use /proc/self/stat to generate the new process_cpu_*_seconds_total metrics | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -4/+12 |
| | |||||
* | Export CPU usage metrics also under prometheus-standard metric name | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -0/+15 |
| | |||||
* | Callback metric values might not just be integers - allow floats | Paul "LeoNerd" Evans | 2016-10-19 | 1 | -2/+2 |
| | |||||
* | Make psutil optional | Erik Johnston | 2016-08-08 | 2 | -5/+13 |
| | |||||
* | Don't explode if we have no snapshots yet | Erik Johnston | 2016-07-20 | 1 | -0/+3 |
| | |||||
* | Add metrics for psutil derived memory usage | Erik Johnston | 2016-07-20 | 2 | -1/+46 |
| | |||||
* | Don't track total objects as its too expensive to calculate | Erik Johnston | 2016-06-07 | 1 | -1/+0 |
| | |||||
* | Record some more GC metrics | Erik Johnston | 2016-06-07 | 1 | -0/+5 |
| | |||||
* | Also record number of unreachable objects | Erik Johnston | 2016-06-07 | 1 | -2/+4 |
| | |||||
* | Change the way we do stats | Erik Johnston | 2016-06-07 | 1 | -7/+3 |
| | |||||
* | Merge pull request #771 from matrix-org/erikj/gc_tick | Erik Johnston | 2016-06-07 | 1 | -0/+26 |
|\ | | | | | Manually run GC on reactor tick. | ||||
| * | Count number of GC collects | Erik Johnston | 2016-05-16 | 1 | -5/+11 |
| | | |||||
| * | Add a comment | Erik Johnston | 2016-05-13 | 1 | -0/+5 |
| | | |||||
| * | Manually run GC on reactor tick. | Erik Johnston | 2016-05-09 | 1 | -0/+15 |
| | | | | | | | | This also adds a metric for amount of time spent in GC. | ||||
* | | Change CacheMetrics to be quicker | Erik Johnston | 2016-06-03 | 2 | -32/+28 |
|/ | | | | | | We change it so that each cache has an individual CacheMetric, instead of having one global CacheMetric. This means that when a cache tries to increment a counter it does not need to go through so many indirections. | ||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 3 | -3/+3 |
| | |||||
* | Check that /proc/self/fd exists before listing it | Mark Haines | 2015-09-07 | 1 | -0/+4 |
| | |||||
* | The maxrss reported by getrusage is in kilobytes, not pages | Mark Haines | 2015-09-07 | 1 | -4/+3 |
| | |||||
* | Also check for presence of 'threadCallQueue' in reactor | Erik Johnston | 2015-08-18 | 1 | -1/+8 |
| | |||||
* | Use more helpful variable names | Erik Johnston | 2015-08-18 | 1 | -3/+3 |
| | |||||
* | Fix pending_calls metric to not lie | Erik Johnston | 2015-08-14 | 1 | -3/+18 |
| | |||||
* | Don't time getDelayedCalls | Erik Johnston | 2015-08-13 | 1 | -1/+1 |
| | |||||
* | Add some metrics about the reactor | Erik Johnston | 2015-08-13 | 1 | -0/+29 |
| | |||||
* | Appease pep8 | Paul "LeoNerd" Evans | 2015-04-01 | 1 | -0/+1 |
| | |||||
* | Report process open filehandles in metrics | Paul "LeoNerd" Evans | 2015-04-01 | 1 | -0/+34 |
| | |||||
* | Appease pyflakes | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+1 |
| | |||||
* | Delete unused import of NOT_READY_YET | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+0 |
| | |||||
* | Appease pep8 | Paul "LeoNerd" Evans | 2015-03-12 | 3 | -7/+9 |
| | |||||
* | Replace the @metrics.counted annotations in federation with ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -17/+0 |
| | | | | specifically-written counters and distributions | ||||
* | Add an .inc_by() method to CounterMetric; implement DistributionMetric a ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -23/+14 |
| | | | | neater way | ||||
* | Don't forbid '_' in metric basenames any more, to allow things like foo_time | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -5/+0 |
| | |||||
* | Rename TimerMetric to DistributionMetric; as it could count more than just time | Paul "LeoNerd" Evans | 2015-03-12 | 2 | -14/+18 |
| | |||||
* | Export CacheMetric as hits+total, rather than hits+misses, as it's easier to ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -5/+6 |
| | | | | derive hit ratio from that | ||||
* | Remember to emit final linefeed from /metrics page, or Prometheus gets upset | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+2 |
| | |||||
* | Prometheus needs "escaped" label values | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -2/+6 |
| | |||||
* | Kill unused CounterMetric.fetch() method | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -3/+0 |
| | |||||
* | Use _ instead of . as a metric namespacing separator, for Prometheus | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -3/+11 |
| | |||||
* | Have all @metrics.counted use a single metric name vectored on the method ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -2/+9 |
| | | | | name, rather than a brand new scalar counter per counted method | ||||
* | Bugfix to rendering output of vectored TimerMetrics | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -3/+2 |
| | |||||
* | Rename Metrics' "keys" to "labels" | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -12/+12 |
| | |||||
* | Provide some process resource usage metrics | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+27 |
| | |||||
* | Neater register_* methods on overall Metrics container | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -22/+12 |
| | |||||
* | Neater implementation of metric render methods by pulling out 'render' as a ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -18/+15 |
| | | | | base method that calls self.render_item | ||||
* | Initial hack at a TimerMetric; for storing counts + duration accumulators | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+48 |
| | |||||
* | Ensure that /_synapse/metrics response is UTF-8 encoded | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+2 |
| | |||||
* | Implement vector CallbackMetrics | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -2/+6 |
| | |||||
* | Neater introspection methods on BaseMetric so that subclasses don't need to ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -4/+11 |
| | | | | touch self.keys directly | ||||
* | Rename CacheCounterMetric to just CacheMetric; add a CallbackMetric ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 2 | -7/+12 |
| | | | | component to give the size of the cache | ||||
* | Ensure that exceptions while rendering individual metrics don't stop others ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+10 |
| | | | | from being rendered anyway - especially useful for CallbackMetric | ||||
* | Initial attempt at a scalar callback-based metric to give instantaneous ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 2 | -1/+24 |
| | | | | snapshot gauges | ||||
* | Create the concept of a cachecounter metric; generating two counters ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 2 | -7/+47 |
| | | | | specific to caches | ||||
* | Have the MetricsResource actually render metric counters | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+3 |
| | |||||
* | An initial implementation of a 'metrics' instance, similar to a 'logger' for ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+69 |
| | | | | keeping counter stats on method calls | ||||
* | Initial tiny attempt at (vectorable) counter metrics | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+54 |
| | |||||
* | A trivial 'hello world'-style resource on /_synapse/metrics, with optional ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+37 |
commandline flag |