userver-framework / userver

Production-ready C++ Asynchronous Framework with rich functionality
https://userver.tech
Apache License 2.0
2.33k stars 270 forks source link

"opentracing" logger depends on default's logger `level` #531

Open TertiumOrganum1 opened 3 months ago

TertiumOrganum1 commented 3 months ago

To store trace-logs to different location (or stream) I declare "opentracing" logger, which is used by userver under the hood. But its level field ignored (you may even skip it) because output of traces depends on default logger's level, i.e. you can't set log level to warning, tracing to info separately.

        tracer:
            service-name: $service-name
        logging:
            fs-task-processor: fs-task-processor
            loggers:
                default:
                    file_path: '@stderr'
                    level: info
                    overflow_behavior: discard  # Drop logs if the system is too busy to write them down.
                opentracing:
                    format: ltsv
                    file_path: '@stdout'                    
                    overflow_behavior: discard 

Expected behavior of different loggers - independent level parameter.

segoon commented 1 month ago

We'll implement a full-blown opentelemetry implementation using OTLP and gRPC collector soon. So current implementation will be deprecated.

TertiumOrganum1 commented 1 month ago

We'll implement a full-blown opentelemetry implementation using OTLP and gRPC collector soon. So current implementation will be deprecated.

Do you mean otel http/grpc exporter in background (otlp push model) like in opentelemetry-cpp?

segoon commented 1 month ago

Correct.