Skip to content

Refactor enricher system in TraceContext #477

@feelform

Description

@feelform

TraceContext currently has multiple enricher patterns that lack consistency:

  • traceCompletionEnrichers — filtered by onComplete method
  • spanRecorderEnricher — found by record method
  • spanEventEnricher — found by recordException method
  • sqlMetadataService — passed separately (not via enricher system)

Each enricher is discovered by duck-typing specific method names and threaded through different paths (Trace, CallStack, SpanEventRecorder). This makes it hard to add new enrichers and increases constructor parameter count.

Consider unifying into a single enricher registry or context object that is passed through the trace lifecycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions