Skip to content

Deprecate Remaining Span class and interface fields #10184

Closed

Description

@Lms24

I realized we still have a lot of fields on the Span class and interface that need to be deprecated.

### `Span` Interface
- [x] https://github.com/getsentry/sentry-javascript/pull/10192
- [ ] https://github.com/getsentry/sentry-javascript/pull/10208
- [ ] https://github.com/getsentry/sentry-javascript/pull/10213
- [ ] https://github.com/getsentry/sentry-javascript/pull/10244
- [ ] https://github.com/getsentry/sentry-javascript/pull/10217
- [ ] https://github.com/getsentry/sentry-javascript/pull/10260
- [ ] https://github.com/getsentry/sentry-javascript/pull/10268
### Additional public `Span` class fields
- [ ] https://github.com/getsentry/sentry-javascript/pull/10187
- [x] `Span.endTimestamp` - same as Span.startTimestamp (via #10192)
- [ ] https://github.com/getsentry/sentry-javascript/pull/10197
- [ ] https://github.com/getsentry/sentry-javascript/pull/10199
- [ ] https://github.com/getsentry/sentry-javascript/pull/10189

ref #10033

### Related fields on other interfaces
- [x] https://github.com/getsentry/sentry-javascript/pull/10274
- [ ] https://github.com/getsentry/sentry-javascript/pull/10361

Activity

  1. self-assigned this
    on Jan 15, 2024
  2. lforst commented on Jan 15, 2024

    @lforst
    Contributor
    • setHttpStatus should probably stay? It's pretty useful and doesn't hurt, unless I am missing something. can probably just go.
    • We have multiple instances where we (and our customers) set start- and endTimestamps. A getter like spanToJson doesn't help here as a migration path. @mydea Can you set the start and end timestamps on otel spans retroactively?
    • spanRecorder can likely be deprecated and be an implementation detail on the span object/class itself.

    The rest looks good to me 👍

  3. added this to the 8.0.0 milestone on Jan 15, 2024
  4. Lms24 commented on Jan 15, 2024

    @Lms24
    MemberAuthor

    We have multiple instances where we (and our customers) set start- and endTimestamps. A getter like spanToJson doesn't help here as a migration path. @mydea Can you set the start and end timestamps on otel spans retroactively?

    setting them via startSpan et al. should still work I think 🤔 ending would need to happen via span.end(endTimestamp)

    IdleTransaction (soon to be IdleSpan) in browser adjusts the endTimestamp. I wonder if for this it's enough to make the timestamps of Span protected (so still remove them publicly).

  5. mydea commented on Jan 15, 2024

    @mydea
    Member

    yeah, retroactive update of start/end time is not possible. This needs to be rewritten to buffer the endtime somewhere (?) and set it - but I think I did this here already kind of #9972, so should work, I hope..!

  6. mydea commented on Jan 16, 2024

    @mydea
    Member

    I will deprecate the timestamps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions