Skip to content

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

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

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

Conversation

@sl0thentr0py
Copy link
Member

No description provided.

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

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 Files Coverage Δ
sentry-ruby/lib/sentry/span.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/transaction.rb 100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/transaction_spec.rb 100.00% <100.00%> (ø)
...ry/rails/tracing/active_storage_subscriber_spec.rb 92.30% <0.00%> (ø)
sentry-rails/spec/sentry/rails/client_spec.rb 100.00% <0.00%> (ø)
...entry-rails/lib/sentry/rails/controller_methods.rb 100.00% <0.00%> (ø)
...entry-rails/spec/sentry/rails/action_cable_spec.rb 100.00% <0.00%> (ø)
sentry-rails/lib/sentry/rails/action_cable.rb 100.00% <0.00%> (ø)
...ails/breadcrumb/monotonic_active_support_logger.rb 100.00% <0.00%> (ø)
...rails/tracing/action_controller_subscriber_spec.rb 100.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.

Copy link
Contributor

@st0012 st0012 left a comment

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.

def finish
def finish(end_timestamp: nil)
# already finished
return if @timestamp
Copy link
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
Member Author

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
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
Member Author

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

Copy link
Contributor

@st0012 st0012 left a comment

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 sl0thentr0py force-pushed the neel/otel/expose-span-id branch from 954d6a2 to 833392f Compare November 29, 2022 12:51
Base automatically changed from neel/otel/expose-span-id to master November 29, 2022 12:52
@sl0thentr0py sl0thentr0py force-pushed the neel/otel-expose-finish branch from e863e25 to 85d1c67 Compare November 29, 2022 12:57
@sl0thentr0py sl0thentr0py enabled auto-merge (squash) November 29, 2022 12:58
@sl0thentr0py sl0thentr0py merged commit 3fad30c into master Nov 29, 2022
@sl0thentr0py sl0thentr0py deleted the neel/otel-expose-finish branch November 29, 2022 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants