Skip to content
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

Add span.TracerProvider() #2009

Merged
merged 4 commits into from Jun 17, 2021

Conversation

Aneurysm9
Copy link
Member

This PR adds a TracerProvider() method to the trace.Span interface. This method allows instrumentation authors to obtain a TracerProvider without pre-configuration by extracting a Span from a Context and utilizing the TracerProvider that was used to construct the extracted Span.

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #2009 (c3d53d4) into main (d020e1a) will increase coverage by 0.0%.
The diff coverage is 91.3%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2009   +/-   ##
=====================================
  Coverage   73.0%   73.0%           
=====================================
  Files        171     171           
  Lines       8675    8687   +12     
=====================================
+ Hits        6338    6348   +10     
- Misses      2068    2070    +2     
  Partials     269     269           
Impacted Files Coverage Δ
bridge/opentracing/internal/mock.go 68.7% <0.0%> (-0.7%) ⬇️
trace/trace.go 98.2% <ø> (ø)
trace/noop.go 50.0% <75.0%> (+3.8%) ⬆️
internal/global/trace.go 84.2% <100.0%> (+0.4%) ⬆️
oteltest/harness.go 84.6% <100.0%> (+0.4%) ⬆️
oteltest/provider.go 100.0% <100.0%> (ø)
oteltest/span.go 100.0% <100.0%> (ø)
oteltest/tracer.go 89.6% <100.0%> (ø)
sdk/trace/span.go 88.9% <100.0%> (+<0.1%) ⬆️

@Aneurysm9 Aneurysm9 added area:trace Part of OpenTelemetry tracing enhancement New feature or request pkg:API Related to an API package pkg:SDK Related to an SDK package priority:p1 labels Jun 17, 2021
oteltest/tracer.go Outdated Show resolved Hide resolved
…provider

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
@Aneurysm9 Aneurysm9 added this to In progress in OpenTelemetry Go RC via automation Jun 17, 2021
@Aneurysm9 Aneurysm9 moved this from In progress to Reviewer approved in OpenTelemetry Go RC Jun 17, 2021
@Aneurysm9 Aneurysm9 merged commit 39fe809 into open-telemetry:main Jun 17, 2021
OpenTelemetry Go RC automation moved this from Reviewer approved to Done Jun 17, 2021
@Aneurysm9 Aneurysm9 deleted the feat/spanTracerProvider branch June 17, 2021 16:05
@Aneurysm9 Aneurysm9 mentioned this pull request Jun 17, 2021
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 enhancement New feature or request pkg:API Related to an API package pkg:SDK Related to an SDK package
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants