-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[WIP] Use native OpenTelemetry Spans in node-experimental #9085
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mydea
force-pushed
the
fn/potel-native-spans
branch
2 times, most recently
from
September 21, 2023 14:09
0b205a2
to
eba86fa
Compare
size-limit report 📦
|
mydea
force-pushed
the
fn/potel-native-spans
branch
from
September 21, 2023 14:40
eba86fa
to
a9ae41c
Compare
mydea
force-pushed
the
fn/potel-wip-baseline
branch
from
September 22, 2023 12:10
946e66f
to
193e67e
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
5 times, most recently
from
September 25, 2023 15:00
52c7697
to
5ec4dab
Compare
mydea
force-pushed
the
fn/potel-wip-baseline
branch
from
September 25, 2023 15:02
193e67e
to
a1cdd7c
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
from
September 25, 2023 15:02
5ec4dab
to
51c4ba6
Compare
mydea
force-pushed
the
fn/potel-wip-baseline
branch
from
September 26, 2023 08:16
a1cdd7c
to
e8442a7
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
2 times, most recently
from
September 26, 2023 13:20
412b45c
to
5f921b3
Compare
mydea
force-pushed
the
fn/potel-wip-baseline
branch
from
September 27, 2023 13:14
e8442a7
to
a7cc51e
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
2 times, most recently
from
September 27, 2023 13:50
85b1659
to
71e2ebf
Compare
Note: This depends on two changes in existing packages which we'll need to merge first - see develop...fn/potel-wip-baseline:
|
mydea
force-pushed
the
fn/potel-native-spans
branch
from
September 27, 2023 14:16
71e2ebf
to
1e3a929
Compare
This was referenced Sep 28, 2023
mydea
force-pushed
the
fn/potel-native-spans
branch
2 times, most recently
from
September 29, 2023 13:26
c7b929b
to
f50ba4c
Compare
meta(changelog): Update changelog for 7.73.0
mydea
force-pushed
the
fn/potel-wip-baseline
branch
from
October 2, 2023 11:09
75b0305
to
9fcee38
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
from
October 2, 2023 11:09
f50ba4c
to
021cb0d
Compare
mydea
force-pushed
the
fn/potel-native-spans
branch
3 times, most recently
from
October 2, 2023 13:39
891c0ea
to
3f53bf6
Compare
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p> <blockquote> <h2>v3.1.3</h2> <h2>What's Changed</h2> <ul> <li>chore(github): remove trailing whitespaces by <a href="https://github.com/ljmf00"><code>@ljmf00</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/313">actions/upload-artifact#313</a></li> <li>Bump <code>@actions/artifact</code> version to v1.1.2 by <a href="https://github.com/bethanyj28"><code>@bethanyj28</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/436">actions/upload-artifact#436</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v3...v3.1.3">https://github.com/actions/upload-artifact/compare/v3...v3.1.3</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-artifact/commit/a8a3f3ad30e3422c9c7b888a15615d19a852ae32"><code>a8a3f3a</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/436">#436</a> from bethanyj28/main</li> <li><a href="https://github.com/actions/upload-artifact/commit/7b48769c030f7121ecb01c3558dd3cd8b9660a20"><code>7b48769</code></a> update dependency cache</li> <li><a href="https://github.com/actions/upload-artifact/commit/66630398dfe3d04deb4c489ac54b9b468f071706"><code>6663039</code></a> update dist/index.js</li> <li><a href="https://github.com/actions/upload-artifact/commit/55e76b779da56f582e27a6f7aff54c1e610551e5"><code>55e76b7</code></a> bump <code>@actions/artifact</code> version</li> <li><a href="https://github.com/actions/upload-artifact/commit/65d862660abb392b8c4a3d1195a2108db131dd05"><code>65d8626</code></a> chore(github): remove trailing whitespaces (<a href="https://redirect.github.com/actions/upload-artifact/issues/313">#313</a>)</li> <li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/v3.1.2...v3.1.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3.1.2&new-version=3.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
[Gitflow] Merge master into develop
mydea
force-pushed
the
fn/potel-native-spans
branch
from
October 2, 2023 15:07
3f53bf6
to
f6fa256
Compare
This extracts the `sampleTransaction` method out and exports this from `core` so we can use it for POTEL (where we build transactions differently).
mydea
force-pushed
the
fn/potel-native-spans
branch
from
October 3, 2023 07:37
f6fa256
to
1531c77
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the performance handling of the node-experimental package fundamentally, aligning it even more with the OpenTelemetry model.
This is a WIP branch on top of some other small refactors that can/should be done to accommodate this - but to keep this as readable as possible, this PR should show only the most relevant changes for now.
Prerequisites
sampleTransaction
method out #9136finish
into underlying_finishTransaction
#9137tunnel
is considered forisSentryUrl
checks #9130Tasks
The core changes are:
startSpan
/startInactiveSpan
create Otel spans now, not Sentry Spans/TransactionsHow does transaction/span creation work now
In the old model, we would start transactions/spans in the span processor
onStart
andonEnd
hook. This required us to keep track of the parent Sentry span, as we need it to callparentSpan.startSpan()
inonStart
. Since it can be tricky to know when a span is not needed anymore as a parent etc, this made garbage collection harder and messier, and also required us to still sprinkle Sentry spans/transactions everywhere through our code.In the new model, only minimal processing is done in the span processor, and importantly, we do not create any Sentry spans yet. We store some additional data we need later in a WeakMap associated to the (Otel) span.
Then we leverage the underlying
BatchSpanProcessor
from OTEL, which collects spans together and sends them for processing to aSpanExporter
. So only finished spans end up in our span processor. Our custom span exporter does the following:For now I copied most of the stuff from opentelemetry-node over, eventually we can merge most of this together probably and export the parts from opentelemetry-node.
How do breadcrumbs work
We now pick all events added to spans and add them as breadcrumbs.
For this, we walk up the tree of spans up to the root and collect all breadcrumbs together. We use a special JSON field for now to actually store the breadcrumbs data (TODO: Maybe there is a better way to do this...).
When we add a breadcrumb, we actually always add it to the root span for now, not the active span. The reason is that this works better with our mental model of breadcrumbs, where anything that happens in this root span is relevant. But we'll also pick up any other events added by otel instrumentation along the way.
Open questions
onEnd
. But not 100% sure how this would work with parallel spans, needs to be tested I guess.