OpenTelemetryService::$logger is not initialized when tracing is disabled

Created on 13 January 2025, 9 days ago

Problem/Motivation

The constructor returns early, so $this->logger is not initialized.

I'm not really clear on what that LoggerHolder is supposed to do? Keep the object in memory? It's only one specific logger instance used in OpenTelemetryService itself?

The container will keep a single instance around as a service anyway.

Why doesn't the deduplication stuff just live in \Drupal\opentelemetry_logs\Logger\OpentelemetryLogs? I think it's enough to deduplicate logs sent to opentelemetry, at least that's what I'd expect.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024