Skip to content

Update Span API event methods#1254

Merged
MrAlias merged 5 commits intoopen-telemetry:masterfrom
MrAlias:addevent
Oct 16, 2020
Merged

Update Span API event methods#1254
MrAlias merged 5 commits intoopen-telemetry:masterfrom
MrAlias:addevent

Conversation

@MrAlias
Copy link
Copy Markdown
Contributor

@MrAlias MrAlias commented Oct 13, 2020

  • Remove the context argument from the event methods. It is unused and can be added back in as a passed option if needed in the future.
  • Update AddEvent to accept a required name and a set of options. These options are the new EventOption type that can be used to configure a SpanConfig Timestamp and Attributes.
  • Remove the AddEventWithTimestamp method as it is redundant to calling AddEvent with a WithTimestamp option.
  • Update RecordError to also accept the EventOptions.

Resolves #1103

Remove the context argument from the event methods. It is unused and can
be added back in as a passed option if needed in the future.

Update AddEvent to accept a required name and a set of options. These
options are the new EventOption type that can be used to configure a
SpanConfig Timestamp and Attributes.

Remove the AddEventWithTimestamp method as it is redundant to calling
AddEvent with a WithTimestamp option.

Update RecordError to also accept the EventOptions.
@MrAlias MrAlias added pkg:API Related to an API package area:trace Part of OpenTelemetry tracing release:required-for-ga labels Oct 13, 2020
@MrAlias MrAlias added this to the RC1 milestone Oct 13, 2020
@MrAlias MrAlias self-assigned this Oct 13, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 13, 2020

Codecov Report

Merging #1254 into master will decrease coverage by 0.0%.
The diff coverage is 62.5%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1254     +/-   ##
========================================
- Coverage    76.4%   76.4%   -0.1%     
========================================
  Files         132     132             
  Lines        5926    5928      +2     
========================================
+ Hits         4532    4533      +1     
- Misses       1142    1146      +4     
+ Partials      252     249      -3     
Impacted Files Coverage Δ
bridge/opentracing/bridge.go 39.0% <0.0%> (-1.0%) ⬇️
bridge/opentracing/internal/mock.go 74.3% <0.0%> (+2.6%) ⬆️
oteltest/mock_span.go 7.6% <0.0%> (-4.9%) ⬇️
trace.go 80.5% <ø> (ø)
trace_noop.go 57.1% <0.0%> (+3.8%) ⬆️
config.go 100.0% <100.0%> (ø)
oteltest/harness.go 100.0% <100.0%> (ø)
oteltest/span.go 100.0% <100.0%> (+2.7%) ⬆️
sdk/trace/span.go 94.9% <100.0%> (+2.0%) ⬆️

Comment thread config.go Outdated
Comment thread config.go Outdated
@MrAlias MrAlias closed this Oct 15, 2020
@MrAlias MrAlias reopened this Oct 15, 2020
Use the LifeCycleOption to encapsulate the options passed to a span for
life cycle events.
Copy link
Copy Markdown
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

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

🚀

@MrAlias MrAlias merged commit ec300b2 into open-telemetry:master Oct 16, 2020
@MrAlias MrAlias deleted the addevent branch October 16, 2020 15:09
@MrAlias MrAlias mentioned this pull request Nov 20, 2020
AzfaarQureshi pushed a commit to open-o11y/opentelemetry-go that referenced this pull request Dec 3, 2020
* Update Span API event methods

Remove the context argument from the event methods. It is unused and can
be added back in as a passed option if needed in the future.

Update AddEvent to accept a required name and a set of options. These
options are the new EventOption type that can be used to configure a
SpanConfig Timestamp and Attributes.

Remove the AddEventWithTimestamp method as it is redundant to calling
AddEvent with a WithTimestamp option.

Update RecordError to also accept the EventOptions.

* Add changes to CHANGELOG

* Add LifeCycleOption

Use the LifeCycleOption to encapsulate the options passed to a span for
life cycle events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:trace Part of OpenTelemetry tracing pkg:API Related to an API package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update trace API Span AddEvent methods

3 participants