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

How to export logs on grpc endpoint? #100

Open
bangbaew opened this issue Oct 25, 2023 · 2 comments
Open

How to export logs on grpc endpoint? #100

bangbaew opened this issue Oct 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bangbaew
Copy link

According to the Official OpenTelemetry Website , if I set OTEL_EXPORTER_OTLP_ENDPOINT env, it will apply to all OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, but this crate seems to apply to only OTEL_EXPORTER_OTLP_TRACES_ENDPOINT as shown on startup, I wanna export Axum logs to OpenTelemetry Collector endpoint, which is then exported to Loki.

I could do this in Actix Web using opentelemetry_appender_log crate, I wonder how to achieve this in Axum?
image

@davidB
Copy link
Owner

davidB commented Oct 26, 2023

I could do this in Actix Web using opentelemetry_appender_log crate, I wonder how to achieve this in Axum?

Currently, I don't know. I'll look at how actixweb does (I'm also interested, but currently I used a dedicated agent fluentd/fluentbit for logs). And last time I look at opentelemetry on rust, metrics was is beta iirc, and logs in alpha or not supported. From Rust | OpenTelemetry: metrics & log are in alpha, and traces in beta.

PR is welcome, if you want to contribute.

@davidB davidB added the enhancement New feature or request label Oct 26, 2023
@davidB
Copy link
Owner

davidB commented Nov 1, 2023

Maybe this crate could do the work (not tested): opentelemetry-appender-tracing - crates.io: Rust Package Registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants