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

use tracing for telemetry #34

Merged
merged 1 commit into from May 22, 2023
Merged

use tracing for telemetry #34

merged 1 commit into from May 22, 2023

Conversation

SuperFluffy
Copy link
Member

@SuperFluffy SuperFluffy commented May 22, 2023

This commit replaces log and flexilogger by tracing and tracing-subscriber. The default log level is info, which can be overriden by using the RUST_LOG environment variable with directives as described in the tracing subscriber docs: https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/struct.EnvFilter.html

Because env var directives are strictly more powerful than setting verbosity levels on the command line the log-level flag is removed.

If astria-conductor is connected to a tty it will emit tracing events using human-readable format. If it is not connected to a tty it will emit JSON.

By default logging is disabled in integration tests. It can be enabled by setting the environment variable TEST_LOG=1.

Note that the service no longer writes explicitly writes logs to a file. Because astria-conductor is intended to be run as a service by a service manager or orchestration platform, it is assumed that persisting logs is handled externally.

Partially addresses #14

This commit replaces log and flexilogger by tracing and tracing-subscriber.
The default log level is `info`, which can be overriden by using the `RUST_LOG`
environment variable with directives as described in the tracing subscriber docs:
https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/filter/struct.EnvFilter.html

Because env var directives are strictly more powerful than setting verbosity levels
on the command line the `log-level` flag is removed.

If astria-conductor is connected to a tty it will emit tracing events using
human-readable format. If it is not connected to a tty it will emit JSON.

By default logging is disabled in integration tests. It can be enabled by
setting the environment variable `TEST_LOG=1`.

Note that the service no longer writes explicitly writes logs to a file.
Because astria-conductor is intended to be run as a service by a service manager
or orchestration platform, it is assumed that persisting logs is handled
externally.
@SuperFluffy SuperFluffy temporarily deployed to BUF May 22, 2023 12:56 — with GitHub Actions Inactive
Copy link
Collaborator

@noot noot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is great!!

@SuperFluffy SuperFluffy merged commit afd0fbe into main May 22, 2023
4 checks passed
@SuperFluffy SuperFluffy deleted the superfluffy/tracing branch May 22, 2023 20:57
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.

None yet

3 participants