-
Notifications
You must be signed in to change notification settings - Fork 347
Remove metrics
listener type in favor of http
listener with metrics
resource
#18584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
bb31f60
1fe3fa4
6e47458
3e16b88
3b05b5e
54b836c
8ccd52c
bb3904c
adaf5b0
cfdacb8
16e87ed
07c6806
d060446
04084ae
b849bed
6c662e0
03ae604
1ce74d4
467084d
25585b4
95eab21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove `metrics` listener (serves metrics at `/metrics`) type in favor of `http` listener with `metrics` resource (serves metrics at `/_synapse/metrics`). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's unclear to me why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thing that @erikjohnston pointed out is that the dedicated Looking at the git history, the threading aspect just seems like the way it was originally implemented and not something explicitly called out for the benefit described above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with the updated conclusion from #18592 (comment) which most likely means we will continue to use the global (assuming we can't come up with a benefit/compelling reason for why we want both) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having thought about it a bit: I think it is worth keeping the separate Even if we keep the separate listener, I think we should still make them render from the same source and remove any differences. If needed its easy enough to change the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
How sure are we that we care about this? Feels like a use case that we're just holding onto especially when we can't find any evidence. From what I'm reading,
I don't see an easy way forward as I don't know how to start another Twisted server in another thread in order to share the I can pull out some of the clean-up from this PR to ship separately. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
[tool.towncrier] | ||
package = "synapse" | ||
filename = "CHANGES.md" | ||
directory = "changelog.d" | ||
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})" | ||
|
||
[[tool.towncrier.type]] | ||
directory = "feature" | ||
name = "Features" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "bugfix" | ||
name = "Bugfixes" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "docker" | ||
name = "Updates to the Docker image" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "doc" | ||
name = "Improved Documentation" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "removal" | ||
name = "Deprecations and Removals" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "misc" | ||
name = "Internal Changes" | ||
showcontent = true | ||
package = "synapse" | ||
filename = "CHANGES.md" | ||
directory = "changelog.d" | ||
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})" | ||
|
||
[[tool.towncrier.type]] | ||
directory = "feature" | ||
name = "Features" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "bugfix" | ||
name = "Bugfixes" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "docker" | ||
name = "Updates to the Docker image" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "doc" | ||
name = "Improved Documentation" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "removal" | ||
name = "Deprecations and Removals" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "misc" | ||
name = "Internal Changes" | ||
showcontent = true | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
|
@@ -47,11 +47,7 @@ target-version = "py39" | |
# flake8-bugbear compatible checks. Its error codes are described at | ||
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b | ||
# B023: Functions defined inside a loop must not use variables redefined in the loop | ||
ignore = [ | ||
"B023", | ||
"E501", | ||
"E731", | ||
] | ||
ignore = ["B023", "E501", "E731"] | ||
select = [ | ||
# pycodestyle | ||
"E", | ||
|
@@ -82,7 +78,15 @@ select = [ | |
|
||
[tool.ruff.lint.isort] | ||
combine-as-imports = true | ||
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"] | ||
section-order = [ | ||
"future", | ||
"standard-library", | ||
"third-party", | ||
"twisted", | ||
"first-party", | ||
"testing", | ||
"local-folder", | ||
] | ||
known-first-party = ["synapse"] | ||
|
||
[tool.ruff.lint.isort.sections] | ||
|
@@ -107,9 +111,7 @@ authors = ["Matrix.org Team and Contributors <[email protected]>"] | |
license = "AGPL-3.0-or-later" | ||
readme = "README.rst" | ||
repository = "https://github.com/element-hq/synapse" | ||
packages = [ | ||
{ include = "synapse" }, | ||
] | ||
packages = [{ include = "synapse" }] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Topic :: Communications :: Chat", | ||
|
@@ -125,7 +127,7 @@ include = [ | |
{ path = "INSTALL.md", format = "sdist" }, | ||
{ path = "mypy.ini", format = "sdist" }, | ||
{ path = "scripts-dev", format = "sdist" }, | ||
{ path = "synmark", format="sdist" }, | ||
{ path = "synmark", format = "sdist" }, | ||
{ path = "sytest-blacklist", format = "sdist" }, | ||
{ path = "tests", format = "sdist" }, | ||
{ path = "UPGRADE.rst", format = "sdist" }, | ||
|
@@ -135,9 +137,7 @@ include = [ | |
{ path = "rust/build.rs", format = "sdist" }, | ||
{ path = "rust/src/**", format = "sdist" }, | ||
] | ||
exclude = [ | ||
{ path = "synapse/*.so", format = "sdist"} | ||
] | ||
exclude = [{ path = "synapse/*.so", format = "sdist" }] | ||
|
||
[tool.poetry.build] | ||
script = "build_rust.py" | ||
|
@@ -178,7 +178,7 @@ signedjson = "^1.1.0" | |
service-identity = ">=18.1.0" | ||
# Twisted 18.9 introduces some logger improvements that the structured | ||
# logger utilises | ||
Twisted = {extras = ["tls"], version = ">=18.9.0"} | ||
Twisted = { extras = ["tls"], version = ">=18.9.0" } | ||
treq = ">=15.1" | ||
# Twisted has required pyopenssl 16.0 since about Twisted 16.6. | ||
pyOpenSSL = ">=16.0.0" | ||
|
@@ -195,7 +195,9 @@ pymacaroons = ">=0.13.0" | |
msgpack = ">=0.5.2" | ||
phonenumbers = ">=8.2.0" | ||
# we use GaugeHistogramMetric, which was added in prom-client 0.4.0. | ||
prometheus-client = ">=0.4.0" | ||
# `prometheus_client.metrics` was added in 0.5.0, so we require that too. | ||
# We chose 0.6.0 as that is the current version in Debian Buster (oldstable). | ||
prometheus-client = ">=0.6.0" | ||
Comment on lines
+198
to
+200
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only change is here. The rest is auto-formatting which I can remove from the diff if prompted. |
||
# we use `order`, which arrived in attrs 19.2.0. | ||
# Note: 21.1.0 broke `/sync`, see https://github.com/matrix-org/synapse/issues/9936 | ||
attrs = ">=19.2.0,!=21.1.0" | ||
|
@@ -297,7 +299,9 @@ all = [ | |
# matrix-synapse-ldap3 | ||
"matrix-synapse-ldap3", | ||
# postgres | ||
"psycopg2", "psycopg2cffi", "psycopg2cffi-compat", | ||
"psycopg2", | ||
"psycopg2cffi", | ||
"psycopg2cffi-compat", | ||
# saml2 | ||
"pysaml2", | ||
# oidc and jwt | ||
|
@@ -307,9 +311,11 @@ all = [ | |
# sentry | ||
"sentry-sdk", | ||
# opentracing | ||
"jaeger-client", "opentracing", | ||
"jaeger-client", | ||
"opentracing", | ||
# redis | ||
"txredisapi", "hiredis", | ||
"txredisapi", | ||
"hiredis", | ||
# cache-memory | ||
"pympler", | ||
# improved user search | ||
|
@@ -397,8 +403,8 @@ enable = "pypy" | |
# | ||
# We temporarily pin Rust to 1.82.0 to work around | ||
# https://github.com/element-hq/synapse/issues/17988 | ||
before-all = "sh .ci/before_build_wheel.sh" | ||
environment= { PATH = "$PATH:$HOME/.cargo/bin" } | ||
before-all = "sh .ci/before_build_wheel.sh" | ||
environment = { PATH = "$PATH:$HOME/.cargo/bin" } | ||
|
||
# For some reason if we don't manually clean the build directory we | ||
# can end up polluting the next build with a .so that is for the wrong | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opinions on calling out the upgrade notes from the changelog entry itself? It looks like usually we prefer to call it out at the top of the changelog section for the version. Doesn't seem like it would hurt to have it in both places. The only problem being the chicken and egg problem of the upgrade notes being written later in order to have the link filled in.