Extensions to onelogger library to use Open telemetry (OTEL) as a backend.
Low maintenance activity. Last release 13 months ago. Weaker on commit activity and recent releases.
pip install nv-one-logger-coreone_logger_core
Summary
This Python project contains the API and libraries for OneLogger: A library for collecting telemetry information from jobs.
The following are the dependency rules for various packages (which we will enforce by creating separate python projects in the end state):
-
core: Classes representing core concepts such as span, event, attributes. All other packages can depend on this package but this package must not depend on any one_logger or telemetry package. Moreover, we must try to minimize the third-party dependencies of this package so that it remains lightweight and easy to adopt by internal and external users (any new dependency can conflict with existing dependencies of the app that is being instrumented).
-
exporter: This package will contain code for various supported exporters. We have a few simple exporters in one_logger_core project. Vendor-specific exporters (OTEL, Kafka, etc) can be added to extend the system. However, each exporter must be added in a separate Python project so that we don't pull in extra dependencies in the
one_logger_coreproject. -
api: This package contains the API to record spans and events.
The application is expected to depend on one_logger_core project and optionally on any project that contains vendor-specific exporters.
Concepts
We have defined our abstractions based on open telemetry concepts.
-
Span: A span represents a unit of work or operation. It can contain events, and can have attributes associated with it. Spans are used to track the execution of operations and their relationships in a distributed system. A span can have a set of events as well as attributes associated with it. In our library, we ensure that a start event is created when the span is created and an end event when the span is stopped. more info.
-
Event: A Span Event represents a meaningful, singular point in time during the Span's duration. Each event has a name, timestamp, and a set of attributes. more info.
-
Attribute: A property of a span or event.
-
Exporter: An exporter sends the data from the instrumented application to an observability backend. This can be Kafka, an experiment management system such as Weights and Biases, or a
collector pipeline. The exporter is responsible to format and serialize data for a particular backend type. For production environments, Open Telemetry recommends exporting the data to a collector pipeline, which then can process and further export the data to the final destination(s). Using a collector pipeline allows the local exporter to stay vendor agnostic, simply send the data to a collector pipeline (e.g., a cluster-level OTEL receiver) and let the collector deal with communication with vendor-specific solutions and backends (serialization for the vendor, retries, filtering sensitive data, and even sending data to multiple backends). Note that this is different from OpenTelemetry's exporter