jack-berg commented on issue #2027: URL: https://github.com/apache/logging-log4j2/issues/2027#issuecomment-1841348203
Hi 👋 - I'm a maintainer from [opentelemetry-java](https://github.com/open-telemetry/opentelemetry-java). Just wanted to chime in with a few notes about the OpenTelemetry API for your consideration: - OpenTelemetry decouples the API from the SDK. The [API](https://github.com/open-telemetry/opentelemetry-java#api) is a set of interfaces (with a minimal Noop default implementation) with strong backwards compatibility guarantees. The [SDK](https://github.com/open-telemetry/opentelemetry-java#sdk) is the reference implementation of the API's set of interfaces. The SDK is highly configurable and extensible. For metrics, the configurability involves the ability to provide custom [MetricExporters](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/export/MetricExporter.java) for exporting metrics out of process (in addition to the built in exporters for prometheus and OTLP), customization of the set of exported metrics and how they are aggregated via [views](https://opentelemetry.io/docs/instrumentation/java/manual/#views), and more. - The idea behind the decoupling is that the API should do nothing (i.e. noop) until someone configures an implementation to handle the calls. Instrumentation like what is being considered for log4j can safely add a dependency on the API, relying on the [strong backwards compatibility guarantees](https://github.com/open-telemetry/opentelemetry-java/blob/main/VERSIONING.md) which allow users to safely resolve conflicting transitive dependencies on the API from different libraries by just updating to the latest. The SDK reference implementation of the API works great out of the box for most people, but if insufficient, a motivated user can provide their own implementation of the API. - OpenTelemetry APIs comprise multiple telemetry signals (logs, metrics, and traces), enabling the telemetry to be correlated across signals and complementary. I.e. logs or metrics recorded in the context of an active trace have correlating metadata allowing you to stitch together the story in the backend. - OpenTelemetry APIs / SDKs are [cross language](https://opentelemetry.io/docs/instrumentation/], allowing a familiar conceptual / configuration experience in polyglot stacks. If you're considering adding metrics to log4j, consider using the OpenTelemetry metrics API, available at maven coordinates `io.opentelemetry:opentelemetry-api`. I believe it will give you the API functionality required while being highly configurable for users. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
