Skip to content

Conversation

@AbhiPrasad
Copy link
Member

ref #8724

In preparation for adding the new span creation methods, startSpan and startActiveSpan, this PR adds name to spanContext. Over time we are going to be moving away from span.description, and this is the first step to get there.

For now, name is just an alias for span.description, and is only added so that users can do

const span = span.startChild({ name: 'NAME HERE' });

relatively easily.

Next steps is to add the span creators!

@AbhiPrasad AbhiPrasad self-assigned this Aug 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.12 KB (+0.36% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.14 KB (+0.09% 🔺)
@sentry/browser - Webpack (gzipped) 21.81 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 69.73 KB (+0.27% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.18 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.18 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 219.89 KB (+0.38% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 84.78 KB (+0.13% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 59.86 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.04 KB (+0.09% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 65.3 KB (+0.39% 🔺)
@sentry/react - Webpack (gzipped) 21.84 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 92.94 KB (+0.32% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.66 KB (+0.1% 🔺)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice!

/**
* @inheritDoc
*/
public setName(name: string): void {
Copy link
Member

Choose a reason for hiding this comment

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

No action required: Should we think about adding span name source field? I was just thinking that in a world of #onlyspans we probably still need a way to annotate the name source, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

For now the answer is no - but we'll come back to this.

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) August 10, 2023 03:16
@AbhiPrasad AbhiPrasad merged commit 6346e53 into develop Aug 10, 2023
@AbhiPrasad AbhiPrasad deleted the abhi-set-name-span branch August 10, 2023 16:51
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.

3 participants