core.otlp
Classes
OpenTelemetry API. |
|
Formatter that adds OpenTelemetry spans to log records. |
Functions
|
Gather data on the currently running process to define an opentelemetry resource. |
Module Contents
- core.otlp.get_resource(raise_on_error: bool) opentelemetry.sdk.resources.Resource[source]
Gather data on the currently running process to define an opentelemetry resource.
- Parameters:
raise_on_error – if True, will raise if an exception is encountered
- Returns:
opentelemetry.sdk.resources.Resource
- class core.otlp._ProcessResourceDetector[source]
Bases:
opentelemetry.sdk.resources.ResourceDetector
- class core.otlp._ServiceResourceDetector[source]
Bases:
opentelemetry.sdk.resources.ResourceDetector
- class core.otlp._ClusterResourceDetector[source]
Bases:
opentelemetry.sdk.resources.ResourceDetector
- class core.otlp.OtlpAPI(extra_detectors: List[opentelemetry.sdk.resources.ResourceDetector] = [])[source]
OpenTelemetry API.
- _configure_resources(extra_detectors: List[opentelemetry.sdk.resources.ResourceDetector]) None[source]
- class core.otlp.OpenTelemetryLogFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
logging.FormatterFormatter that adds OpenTelemetry spans to log records.
- format(record: Any) Any[source]
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.