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

Move trace api package into otel #1229

Merged
merged 11 commits into from
Oct 9, 2020
Merged

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Oct 7, 2020

Move the api/trace package into the otel with the following changes:

  • trace.ID has been renamed to otel.TraceID.
  • trace.IDFromHex has been renamed to otel.TraceIDFromHex
  • trace.EmptySpanContext is removed to reduce the package contents and maintenance burden and the simplicity to duplicate the functionality it provided.
  • The package documentation has been updated.
  • The ErrorOption has been changed to an interface to conform with the project design guidelines which included adding a NewErrorConfig function.

The api/trace/tracetest package is moved to otel/oteltest.

Part of #964 and #1179

@MrAlias MrAlias added prototype Feature to prototype a spec-level decision Skip Changelog PRs that do not require a CHANGELOG.md entry labels Oct 7, 2020
@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #1229 into master will increase coverage by 0.2%.
The diff coverage is 80.4%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1229     +/-   ##
========================================
+ Coverage    76.6%   76.9%   +0.2%     
========================================
  Files         133     130      -3     
  Lines        5754    5761      +7     
========================================
+ Hits         4412    4433     +21     
+ Misses       1093    1079     -14     
  Partials      249     249             
Impacted Files Coverage Δ
api/global/internal/state.go 81.8% <ø> (ø)
api/global/internal/trace.go 88.8% <ø> (ø)
api/global/trace.go 66.6% <ø> (ø)
bridge/opentracing/util.go 100.0% <ø> (ø)
exporters/stdout/exporter.go 25.9% <ø> (ø)
oteltest/mock_span.go 12.5% <0.0%> (ø)
sdk/trace/sampling.go 100.0% <ø> (ø)
internal/trace/parent/parent.go 21.0% <40.0%> (ø)
propagators/trace_context.go 65.5% <52.3%> (ø)
trace_noop.go 53.3% <53.3%> (ø)
... and 22 more

@MrAlias MrAlias self-assigned this Oct 8, 2020
@MrAlias MrAlias added area:trace Part of OpenTelemetry tracing pkg:API Related to an API package priority:p1 and removed Skip Changelog PRs that do not require a CHANGELOG.md entry prototype Feature to prototype a spec-level decision labels Oct 8, 2020
@MrAlias MrAlias added this to the RC1 milestone Oct 8, 2020
@MrAlias MrAlias marked this pull request as ready for review October 8, 2020 01:03
doc.go Outdated Show resolved Hide resolved
doc.go Outdated Show resolved Hide resolved
sdk/trace/sampling.go Outdated Show resolved Hide resolved
trace.go Outdated Show resolved Hide resolved
trace.go Outdated Show resolved Hide resolved
MrAlias and others added 2 commits October 8, 2020 09:39
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Includes resolutions for review issues.
@louiemiranda
Copy link

This has broke https://github.com/go-redis/redis

../../../github.com/go-redis/redis/internal/util.go:10:2: cannot find package "go.opentelemetry.io/otel/api/trace" in any of: /usr/local/Cellar/go/1.13/libexec/src/go.opentelemetry.io/otel/api/trace (from $GOROOT) /Users/louie/go/src/go.opentelemetry.io/otel/api/trace (from $GOPATH)

@Aneurysm9
Copy link
Member

This has broke https://github.com/go-redis/redis

../../../github.com/go-redis/redis/internal/util.go:10:2: cannot find package "go.opentelemetry.io/otel/api/trace" in any of: /usr/local/Cellar/go/1.13/libexec/src/go.opentelemetry.io/otel/api/trace (from $GOROOT) /Users/louie/go/src/go.opentelemetry.io/otel/api/trace (from $GOPATH)

It hasn't. Please ensure that you are using Go in module mode. That is the default in 1.14+, which is all that is currently supported by this project. When using Go in module mode the go.mod in the go-redis module will instruct Go to use v0.11.0 which has all of the packages in the place go-redis expects to find them.

@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
* Move trace API to otel

* Move tracetest to oteltest

* Update package documentation

* Remove old api/trace package

* Lint

* Add changes to CHANGELOG

* Add tests for rest of trace API

* Apply suggestions from code review

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Documentation fixes

Includes resolutions for review issues.

* Correct CHANGELOG post release

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
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.

4 participants