Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Document Contexts.trace #244

Closed
marandaneto opened this issue Jan 15, 2021 · 11 comments
Closed

Document Contexts.trace #244

marandaneto opened this issue Jan 15, 2021 · 11 comments
Labels
enhancement New feature or request performance

Comments

@marandaneto
Copy link
Contributor

marandaneto commented Jan 15, 2021

https://develop.sentry.dev/sdk/event-payloads/contexts/

Apparently, it's the same as a Span, that's what I learn here https://develop.sentry.dev/sdk/event-payloads/transaction/#contextstrace
if so, it'd be nice to add an Entry to the Contexts page and link to the Spans one

@brustolin

@marandaneto marandaneto added enhancement New feature or request performance labels Jan 15, 2021
@marandaneto
Copy link
Contributor Author

@rhcarvalho could you confirm that? thanks.

@rhcarvalho
Copy link
Contributor

Similar fields, but not the same as a span. The trace context contains data about the transaction ("transaction span", "root span" of a tree).

@marandaneto
Copy link
Contributor Author

marandaneto commented Jan 15, 2021

I see

A Transaction has to have a specific contexts.trace entry that contains data from the Span.

so Ideally we'd need to document properly what a Contexts.trace really is (field by field)

@rhcarvalho
Copy link
Contributor

In terms of fields, fields-of(transaction) = fields-of(span) + "name"; I think it would be clearer documenting how to map from a transaction to an event. Each transaction field from its in-memory representation maps to some part of the pre-existing event type.

@rhcarvalho
Copy link
Contributor

@rhcarvalho
Copy link
Contributor

Note: I was not able to make the UI show data for the root span in the same way that it shows for child spans:

image

@rhcarvalho
Copy link
Contributor

I see we got a bit side-tracked in the conversation here.

Copying from getsentry/sentry-cocoa#1065 (comment) below


The trace context is just part of the transaction that is not a top-level event field.

See https://github.com/getsentry/sentry-go/blob/57123a409be55f61b1d5a6da93c176c55a399ad0/tracing.go#L313-L352.

The fields are:

TraceID
SpanID
ParentSpanID
Op
Description
Status

And note that SpanContext (as described in the spec as a data bag for spans) != TraceContext.

@marandaneto
Copy link
Contributor Author

@rhcarvalho on Java, the SpanContext has the addition of 2 fields, sampled and tags

@rhcarvalho
Copy link
Contributor

If Java is sending those in the "trace context" Relay will accept it (as it accepts unknown keys for forward-compatibility) but it has no use, so just wasting bytes.

@bruno-garcia
Copy link
Member

Relates to #320

@marandaneto
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

3 participants