Aggregated metrics for payjoin-service (with OTel Collector sidecar)#1323
Closed
spacebear21 wants to merge 2 commits intopayjoin:masterfrom
Closed
Aggregated metrics for payjoin-service (with OTel Collector sidecar)#1323spacebear21 wants to merge 2 commits intopayjoin:masterfrom
spacebear21 wants to merge 2 commits intopayjoin:masterfrom
Conversation
This enables structured log output and configures exporters for OpenTelemetry.
Collaborator
Pull Request Test Coverage Report for Build 21928328465Details
💛 - Coveralls |
2 tasks
Contributor
IP seems fine, but panicking the program unless it's set comes to mind, and then reporting as "You're running as x.y.z |
Contributor
The OpenTelemetry Collector sidecar scrapes Prometheus metrics and receives traces and logs from the `tracing` crate. Everything is then tagged with operator metadata and exported to a Grafana OTLP endpoint.
fabf8dd to
e1fd193
Compare
2 tasks
Collaborator
Author
|
Superseded by #1327 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a mechanism for collecting aggregated metrics from distributed payjoin-service operators. This is achieved by introducing an (optional) OpenTelemetry Collector sidecar that scrapes the local Prometheus
/metricsendpoint, collects structured logs from the service's stdout, and receives traces. It pushes all three signal types to the Grafana Cloud instance I setup for the payjoin org using per-operator credentials. Claude drew this nice explanatory diagram:This is an opt-in design. Each operator who opts-in needs to request an auth token from us and configure the collector accordingly.
Some open questions for reviewers:
--telemetryfeature overkill? nix2container needs to build the docker image with all features enabled anyway, so in practice payjoin-service features aren't really configurable for docker users. The same goes for the--acmefeature.acme.domainsif it's set? IP address? Random UID?AI disclosure: I used Opus 4.6 to design the system and write much of the code and config files, manually reviewed everything and edited as needed.
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.