You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing metrics will presumably be more challenging, implementing logging looks much easier in the meantime.
The basic OpenTelemetry.Logging.Core.Log type is there (although the tracingDetails field should be broken up as you can have a TraceID without a SpanID, and visa versa; likewise for the TraceFlags), and the protos are there (for the OTLP protocol, anyway). It looks like it should be straightforward enough to:
Refactor the TracerProvider and Tracer classes to be implemented in terms of generic SignallerProvider and Signaller types, which are parameterised by the signal output type (e.g. ImmutableSpan or Log), signal-specific extra data and hooks. Much of existing logic for these types is generic. This is probably the step with the most effort, but it shouldn't be difficult.
Implement LoggerProvider and Logger in terms of SignallerProvider and Signaller
Implement the Logs Bridge API (that is, implement the emit function; should be trivial given the prior two steps)
Implement the remainder of the Logs SDK (most of this logic should already be in the SignallerProvider and Signaller implementations)
Refactor the two SDK processors (Simple and Batch) to be parameterised by signal type. I don't think either of them actually depend on ImmutableSpans at the moment, other than overly-strict type annotations?
Refactor the existing OTLP exporter code to be generic over the signal type.
Implement the construction of the Log PDUs for the request. Should be trivial.
The first step will be the biggest change, and probably the only one which might break existing code (unless appropriate type aliases and possibly pattern synonyms are introduced); after that, each step can be implemented gradually in point releases if necessary.
Am I missing anything?
The text was updated successfully, but these errors were encountered:
While implementing metrics will presumably be more challenging, implementing logging looks much easier in the meantime.
The basic
OpenTelemetry.Logging.Core.Log
type is there (although thetracingDetails
field should be broken up as you can have aTraceID
without aSpanID
, and visa versa; likewise for theTraceFlags
), and the protos are there (for the OTLP protocol, anyway). It looks like it should be straightforward enough to:TracerProvider
andTracer
classes to be implemented in terms of genericSignallerProvider
andSignaller
types, which are parameterised by the signal output type (e.g.ImmutableSpan
orLog
), signal-specific extra data and hooks. Much of existing logic for these types is generic. This is probably the step with the most effort, but it shouldn't be difficult.LoggerProvider
andLogger
in terms ofSignallerProvider
andSignaller
emit
function; should be trivial given the prior two steps)SignallerProvider
andSignaller
implementations)Simple
andBatch
) to be parameterised by signal type. I don't think either of them actually depend onImmutableSpan
s at the moment, other than overly-strict type annotations?The first step will be the biggest change, and probably the only one which might break existing code (unless appropriate type aliases and possibly pattern synonyms are introduced); after that, each step can be implemented gradually in point releases if necessary.
Am I missing anything?
The text was updated successfully, but these errors were encountered: