Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): Add origin to trace context and span #1984

Merged
merged 22 commits into from
Apr 7, 2023

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Mar 30, 2023

Adds origin to both trace context and the span. The origin of the span indicates what created the span.

Related RFC getsentry/rfcs#73 and develop docs PR getsentry/develop#887

@philipphofmann philipphofmann marked this pull request as ready for review March 31, 2023 08:11
@philipphofmann philipphofmann requested a review from a team March 31, 2023 08:11
Copy link
Contributor

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could enforce alphanumeric characters: a-z , A-Z , and 0-9 and underscores: _ as pointed out in the develop docs.

Let's do this. It can easily be done by adding allow_chars to the metastructure of the property, see example. Blocking the PR for this.

relay-general/src/protocol/contexts/trace.rs Outdated Show resolved Hide resolved
relay-general/src/protocol/span.rs Outdated Show resolved Hide resolved
relay-general/src/protocol/span.rs Outdated Show resolved Hide resolved
Comment on lines 70 to 72
/// Origin type such as `auto.http`.
/// Follows the pattern described in the [develop docs](https://develop.sentry.dev/sdk/performance/trace-origin/).
pub type OriginType = String;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this earlier, but let's move this to relay-general/protocol/contexts/mod.rs, like OperationType.

relay-general/src/protocol/contexts/trace.rs Show resolved Hide resolved
@philipphofmann philipphofmann enabled auto-merge (squash) April 6, 2023 14:47
@philipphofmann philipphofmann merged commit 6242ca3 into master Apr 7, 2023
@philipphofmann philipphofmann deleted the feat/trace-and-span-origin branch April 7, 2023 07:37
philipphofmann added a commit to getsentry/sentry that referenced this pull request May 2, 2023
With getsentry/relay#1984, Relay officially
accepts a new property on the span called origin. The origin
property indicates what precisely created the span. This PR sends
origin for opening span details to investigate  that data in Amplitude.
philipphofmann added a commit to getsentry/sentry that referenced this pull request May 9, 2023
With getsentry/relay#1984, Relay officially
accepts a new property on the span called `origin`. The origin property
indicates what precisely created the span. This PR sends origin for
opening span details to investigate that data in Amplitude. The
Amplitude event is [`Performance Views: Event Details span details
opened`](https://data.amplitude.com/sentry/sentry.io/events/main/latest/Performance%20Views%3A%20Event%20Details%20span%20details%20opened?view=All&tab=DETAILS&propertyValidityFilter=All%2520Properties).
For more information on trace origin, visit the [develop
docs](https://develop.sentry.dev/sdk/performance/trace-origin/).
volokluev pushed a commit to getsentry/sentry that referenced this pull request May 30, 2023
With getsentry/relay#1984, Relay officially
accepts a new property on the span called `origin`. The origin property
indicates what precisely created the span. This PR sends origin for
opening span details to investigate that data in Amplitude. The
Amplitude event is [`Performance Views: Event Details span details
opened`](https://data.amplitude.com/sentry/sentry.io/events/main/latest/Performance%20Views%3A%20Event%20Details%20span%20details%20opened?view=All&tab=DETAILS&propertyValidityFilter=All%2520Properties).
For more information on trace origin, visit the [develop
docs](https://develop.sentry.dev/sdk/performance/trace-origin/).
philipphofmann added a commit to getsentry/sentry that referenced this pull request Jun 12, 2023
With getsentry/relay#1984, Relay officially
accepts a new property on the span called origin. The origin property
indicates what precisely created the span. This PR adds this property in
the span details view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants