Skip to content

Expose end_timestamp in Span#finish and Transaction#finish - #1946

Merged
sl0thentr0py merged 1 commit into
masterfrom
neel/otel-expose-finish
Nov 29, 2022
Merged

Expose end_timestamp in Span#finish and Transaction#finish#1946
sl0thentr0py merged 1 commit into
masterfrom
neel/otel-expose-finish

Conversation

@sl0thentr0py

Copy link
Copy Markdown
Member

No description provided.

@sl0thentr0py
sl0thentr0py changed the base branch from master to neel/otel/expose-span-idNovember 23, 2022 15:22
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Base: 96.56% // Head: 98.35% // Increases project coverage by +1.78% 🎉

Coverage data is based on head (f2d6d71) compared to base (954d6a2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@ Coverage Diff @@## neel/otel/expose-span-id #1946 +/- ##
============================================================
+ Coverage 96.56% 98.35% +1.78% 
============================================================
Files 121 151 +30 Lines 7723 9380 +1657 ============================================================
+ Hits 7458 9226 +1768 + Misses 265 154 -111 
Impacted FilesCoverage Δ
sentry-ruby/lib/sentry/span.rb100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/transaction.rb100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/transaction_spec.rb100.00% <100.00%> (ø)
...ry/rails/tracing/active_storage_subscriber_spec.rb92.30% <0.00%> (ø)
sentry-rails/spec/sentry/rails/client_spec.rb100.00% <0.00%> (ø)
...entry-rails/lib/sentry/rails/controller_methods.rb100.00% <0.00%> (ø)
...entry-rails/spec/sentry/rails/action_cable_spec.rb100.00% <0.00%> (ø)
sentry-rails/lib/sentry/rails/action_cable.rb100.00% <0.00%> (ø)
...ails/breadcrumb/monotonic_active_support_logger.rb100.00% <0.00%> (ø)
...rails/tracing/action_controller_subscriber_spec.rb100.00% <0.00%> (ø)
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@st0012st0012 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this can base on master instead.

Comment threadsentry-ruby/lib/sentry/span.rb Outdated
def finish
def finish(end_timestamp: nil)
# already finished
return if @timestamp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This isn't mentioned in the spec so I want to double check it: we only allow the first override but not the second time or later?
If that's true, can we add a test case for it?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

ah no, it should override either way, good catch!

@@ -90,11 +90,11 @@ def initialize(

# Finishes the span by adding a timestamp.
# @return [self]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We forgot to mention that it could return nil too (early return)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I think it should never return nil, will also fix

@st0012st0012 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can merge this once the changelog entry is updated + the build is fixed by updating the base branch.

@sl0thentr0py
sl0thentr0pyforce-pushed the neel/otel/expose-span-id branch from 954d6a2 to 833392fCompareNovember 29, 2022 12:51
Base automatically changed from neel/otel/expose-span-id to masterNovember 29, 2022 12:52
@sl0thentr0py
sl0thentr0py enabled auto-merge (squash) November 29, 2022 12:58
@sl0thentr0py
sl0thentr0py merged commit 3fad30c into masterNov 29, 2022
@sl0thentr0py
sl0thentr0py deleted the neel/otel-expose-finish branch November 29, 2022 12:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sl0thentr0py@codecov-commenter@st0012@AbhiPrasad