-
Notifications
You must be signed in to change notification settings - Fork 1
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
misc: small additions to logging; bump git2
and rust-version
versions
#43
Conversation
Also move the `clean_path` function from `serve/mod.rs` to `utils/paths.rs`, so it's re-usable across modules.
Reorganize StelaeRootSpan to include all the apps HTTP requests, including versions. Add some initial tracing debugs to versions endpoint.
Ran `cargo update` to bump all possible versions for our dependencies. Updated git2 to 0.18, due to a found high severity dependabot security report.
0835741
to
6f645f6
Compare
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.
Looks good.
Just wondering, tracing_actix_web::TracingLogger
adds meta data to HTTP log lines, like request headers etc?
Yes. Does this current tracing span look reasonable? 2024-06-05T17:53:34.643388Z DEBUG HTTP request{http.method=GET http.route=/_api/versions/{path:.*} http.flavor=1.1 http.scheme=http http.host=localhost:8080 http.client_ip=127.0.0.1 http.user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 http.target=/_api/versions/ otel.name=HTTP GET /_api/versions/{path:.*} otel.kind="server" request_id=5e030f03-57bd-4b2b-8186-e3871bffde75}:versions{params=Path(Version { publication: None, date: None, compare_date: None, path: Some("") })}: stelae::server::api::versions: Fetching publication versions for '/'
2024-06-05T17:53:34.683477Z DEBUG HTTP request{http.method=GET http.route=/_api/versions/{path:.*} http.flavor=1.1 http.scheme=http http.host=localhost:8080 http.client_ip=127.0.0.1 http.user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 http.target=/_api/versions/ otel.name=HTTP GET /_api/versions/{path:.*} otel.kind="server" request_id=5e030f03-57bd-4b2b-8186-e3871bffde75}:versions{params=Path(Version { publication: None, date: None, compare_date: None, path: Some("") })}: stelae::server::api::versions: Found 65 versions |
It looks great! I imagine that kind of stuff can be hooked into things like https://sentry.io, or at least I mean it can help you do some powerful debugging. And I guess you could probably add your own data to it, say the user ID or something. |
Agreed. I don't know much about how sentry works, but centralized logging has been on my mind for a while now. I'll have some talks to see whether we can get that onto our stelae roadmap. |
/
from the requestversions
endpoint;git2
version to0.18
. This solves a CVE issue found in libgit2;rust-version
to1.78
;cargo update