Skip to content
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

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

n-dusan
Copy link
Contributor

@n-dusan n-dusan commented Jun 6, 2024

  • Fix url resolution by cleaning the trailing / from the request
  • Add more tracing spans to app, and add debug tracing to versions endpoint;
  • Upgrade git2 version to 0.18. This solves a CVE issue found in libgit2;
  • Bump rust-version to 1.78;
  • Bump all other dependencies using cargo update

n-dusan added 4 commits June 5, 2024 19:19
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.
@n-dusan n-dusan requested a review from tombh June 6, 2024 10:12
@n-dusan n-dusan self-assigned this Jun 6, 2024
@n-dusan n-dusan force-pushed the ndusan/versions-logging branch from 0835741 to 6f645f6 Compare June 6, 2024 10:12
Copy link
Contributor

@tombh tombh left a 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?

@n-dusan
Copy link
Contributor Author

n-dusan commented Jun 6, 2024

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

@tombh
Copy link
Contributor

tombh commented Jun 6, 2024

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.

@n-dusan
Copy link
Contributor Author

n-dusan commented Jun 6, 2024

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.

@n-dusan n-dusan merged commit 7f015fa into main Jun 6, 2024
4 checks passed
@n-dusan n-dusan deleted the ndusan/versions-logging branch June 6, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants