Skip to content

Data set on the TransactionTracer is dropped when the tracer gets converted to a SentryTransaction #4923

@jamescrosswell

Description

@jamescrosswell

The tracer has a SetData method:

public void SetData(string key, object? value) => _data[key] = value;

However this never gets used when creating a transaction from a tracer:

_breadcrumbs = tracer.Breadcrumbs.ToList();
_tags = tracer.Tags.ToDict();
_spans = FromTracerSpans(tracer);

Internally the SentryTransaction defers to _contexts.Trace.Data to store extra data...

TransactionTracer.Contexts.Trace.SetData does work... however this isn't obvious to SDK users. Maybe TransactionTracer.Data should also just wrap TransactionTracer.Contexts.Trace.Data and TransactionTracer.SetData should just call TransactionTracer.Contexts.Trace.SetData?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions