hs-opentelemetry-api-0.1.0.0: OpenTelemetry API for use by libraries for direct instrumentation or wrapper packages.
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenTelemetry.Logging.Core

Documentation

data Log body Source #

Constructors

Log 

Fields

  • timestamp :: Maybe Timestamp

    Time when the event occurred measured by the origin clock. This field is optional, it may be missing if the timestamp is unknown.

  • tracingDetails :: Maybe (TraceId, SpanId, TraceFlags)

    Tuple contains three fields:

    • Request trace id as defined in W3C Trace Context. Can be set for logs that are part of request processing and have an assigned trace id.
    • Span id. Can be set for logs that are part of a particular processing span.
    • Trace flag as defined in W3C Trace Context specification. At the time of writing the specification defines one flag - the SAMPLED flag.
  • severityText :: Maybe Text

    severity text (also known as log level). This is the original string representation of the severity as it is known at the source. If this field is missing and SeverityNumber is present then the short name that corresponds to the SeverityNumber may be used as a substitution. This field is optional.

  • severityNumber :: Maybe Int64

    SeverityNumber is an integer number. Smaller numerical values correspond to less severe events (such as debug events), larger numerical values correspond to more severe events (such as errors and critical events). The following table defines the meaning of SeverityNumber value:

    SeverityNumber rangeRange nameMeaning
    1-4TRACEA fine-grained debugging event. Typically disabled in default configurations.
    5-8DEBUGA debugging event.
    9-12INFOAn informational event. Indicates that an event happened.
    13-16WARNA warning event. Not an error but is likely more important than an informational event.
    17-20ERRORAn error event. Something went wrong.
    21-24FATALA fatal error such as application or system crash.
  • name :: Maybe Text

    Short low cardinality event type that does not contain varying parts. Name describes what happened (e.g. ProcessStarted). Recommended to be no longer than 50 characters. Typically used for filtering and grouping purposes in backends.

  • body :: body

    A value containing the body of the log record. Can be for example a human-readable string message (including multi-line) describing the event in a free form or it can be a structured data composed of arrays and maps of other values. First-party Applications SHOULD use a string message. However, a structured body may be necessary to preserve the semantics of some existing log formats. Can vary for each occurrence of the event coming from the same source. This field is optional.

  • resource :: Maybe MaterializedResources

    Describes the source of the log, aka resource. Multiple occurrences of events coming from the same event source can happen across time and they all have the same value of Resource. Can contain for example information about the application that emits the record or about the infrastructure where the application runs. Data formats that represent this data model may be designed in a manner that allows the Resource field to be recorded only once per batch of log records that come from the same source. SHOULD follow OpenTelemetry semantic conventions for Resources. This field is optional.

  • attributes :: Maybe [(Text, Attribute)]

    Additional information about the specific event occurrence. Unlike the Resource field, which is fixed for a particular source, Attributes can vary for each occurrence of the event coming from the same source. Can contain information about the request context (other than TraceId/SpanId). SHOULD follow OpenTelemetry semantic conventions for Log Attributes or semantic conventions for Span Attributes. This field is optional.

Instances

Instances details
Functor Log Source # 
Instance details

Defined in OpenTelemetry.Logging.Core

Methods

fmap :: (a -> b) -> Log a -> Log b #

(<$) :: a -> Log b -> Log a #