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
Naturally, I would expect Sentry to support the same data types as in Span.attributes itself. Anything extra can be gracefully dropped, or serialized somehow, if configured explicitly:
exportfunction_convertToSpanAttributes(data: unknown): SpanAttributes{// type checks, attribute traversals, array maps, etc...}exportfunction_extractAttributesFromEntry(entry: PerformanceEntry): SpanAttributes{if(isPerformanceMeasure(entry)){return_convertToSpanAttributes(entry.detail);}// Here we can support more entry typesreturn{};}exportfunction_addMeasureSpans(...
...
// The PerformanceMeasure may contain arbitrary metadata in "detail" attribute.// We try to add as much as possible from "detail" to attributesconstattributesFromEntry=_extractAttributesFromEntry(entry);constattributes: SpanAttributes={
...attributesFromEntry,[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',};
Product Area
Unknown
The text was updated successfully, but these errors were encountered:
Problem Statement
Sentry automatically creates Spans from PerformanceEvents, which is great 👍
But manually created measure events contain the analog of
Span.attributes
named PerformanceMeasure.detail, which are not propagated to traces.Here's how the native measure event looks in dev-tools:
And here's the
Span
created from it, lacking vital data:My request is
...to enrich
Span.attributes
with thedetail
data 🙏Thank you for consideration! 😊
Solution Brainstorm
The caveat is, of course, that the
PerformanceMeasure.detail
is not type-restricted and can be anything whatsoever:Naturally, I would expect Sentry to support the same data types as in
Span.attributes
itself. Anything extra can be gracefully dropped, or serialized somehow, if configured explicitly:Product Area
Unknown
The text was updated successfully, but these errors were encountered: