Skip to content

Replace GenericWriterExporter with own structs based on std.Io #30

Description

@inge4pres

Describe the current state

The logs and trace SDK exporters have a "GenericWriterExporter" generic struct that is used to build comptime types for creating StdOut and InMemory exporters.

/// GenericWriterExporter is the generic SpanExporter that outputs spans to the given writer.
fn GenericWriterExporter(
comptime Writer: type,
) type {

Describe the desired state

It would be nice if we could adapt this struct to accept a *std.Io.Writer parameter directly instead of relying on runtime checks on the generic field. If we can't, we can even remove the struct and use std.Io in the exporters directly.

I think we do it already differently for the metrics SDK, since we don't rely on the generic type anymore and both Stdout and InMemory exporters have their own implementation.

Goals:

  • Refactor or remove GenericWriterExporter in logs/trace SDK exporters
  • Adapt tests and examples accordingly (if needed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions