* Add a tool to auto-generate replace directives
* Auto-generated changes from previous commit
* Create new modules required for trace release
* otel/metric
* otel/trace
* otel/oteltest
* otel/sdk/export/metric
* otel/sdk/metric
Relates to #1467
* Move metric-related public API out of otel/ pkg
Move GetMeterProvider, Meter and SetMeterProvider to new package
otel/metric/global in the otel/metric module.
This will allow otel/ module to be released as v1.0.
* Include PR references in CHANGELOG
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Check for root dir
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Move global code to toplevel package
* Move version function to toplevel package
* Update changelog
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* 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.
* 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>
* Update codes to match specification
* Add changes to changelog
* go mod tidy
* Add unit tests for codes
* Update SetStatus methods to only filter Unset
* Update apitest code being tested
* Move api/baggage to the propagators package
* Create Baggage API to match specification
* Update CHANGELOG.md
* Baggage API unit tests
* Rename and add unit test
* Update unit test value checking
* Update TODO with issue tracking work.
* Rename *Provider names
There is overlap in naming with MeterProviders and TracerProviders. This
is means the specification is not implemented and these types can not
exist in the same package (#1179). This makes each type and related
functions and types explicit.
* Add changes to CHANGELOG
* Convert XConfigure into constructors
Previously, we discussed the possibility of converting
the config types into internal ones. But due to the
cyclic dependencies it introduces, we are only
converting XConfigure into constructors and document that
XConfig types are most likely are not going to be directly
used by developers.
In package documents, constructors will be nicely listed
under the config types and they won't be yet another
standalone symbol developers need to learn about.
Fixes#1130.
* Add the changes to the CHANGELOG
* Unexport NoopXXX trace types
The change unexports the noop implementations and provide the NoopProvider function for user to construct noop providers. Users can access noop tracer and noop spans by using the provider.
This change removes the types users should never be directly using from the package. It improves the usability of the API by reducing the API surface to half and helping the user to focus on the canonical APIs.
Fixes#1133
* Provide noop tracer and span for internal use
* Remove obsolete doc
* Use noop span instead of nil
* Fix the broken build
* Unify API Span Start/End Options
Replace both with `SpanOption`. Add a unified `SpanConfig` to match and
a `SpanConfigure` function to parse a `SpanConfig` from `SpanOption`s.
Update all the related options to use new `SpanOption`s.
* No non-zero SpanConfig defaults
The SDK uses an internal clock for the current time that cannot be use
if it does not know the time has not been set.
* Append attributes for WithAttributes
This preserves existing behavior.
* Add unit test for SpanConfigure
* Propagate changes
* Update append option documentation
* Update testing comments
* Move comments on guarantees to appropriate function
* Add documentation for SDK methods
Include SDK implementation specific information in the Tracer Start
method and Span End method.
* Add changes to Changelog
* Apply suggestions from code review
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Update the SpanKind comment in the SpanConfig
Try for a less tautological comment.
Co-authored-by: ET <evantorrie@users.noreply.github.com>
* Move proto to OTLP exporter
* Update OTLP exporter import of proto
* Use gogo protobuf
To stop using the deprecated github.com/golang/protobuf and match what
the collector is doing, switch to generating OTLP with the
github.com/gogo/protobuf/proto instead of
github.com/golang/protobuf/proto.
* Clean dependencies
Remove all protobuf dependencies from otel package and all of its
dependencies.
* Update CHANGELOG
* Clean OTLP exporter go mod
Remove submodule beforehand to avoid unneeded direct dependencies.
* Use default ref for GitHub workflow
* Update path that triggers proto gen action
* Correct license-check exclusion for OTLP
* Update commented location of the OTLP and code
* Add otel/codes package to replace google.golang.org/grpc/codes
* Replace google.golang.org/grpc/codes with otel/codes
* Update opentracing bridge to use OTel codes
* Update semconv to use OTel codes
* Update SDK to convert from OTel codes to gRPC
* go mod tidy
* Add change to CHANGELOG
* Fix word from feedback
* Clean stale indirect dependency requirements
In the recent changes to isolate the main `otel` package there were many
indirect dependencies of the package that were removed, however, the
go.mod was not automatically cleaned of these. This removes those (and
similar ones in the otel-collector example and otel exporter) and prunes
the go.sum files accordingly.
* Run in a clean system to reproduce build
* Make opentracing bridge into own Go module
* Update dependabot config
* Clean dependencies of project
Now the bridge is a module, clean all upstream modules that no longer
implicitly depend on it.
* Update Changelog
* go mod tidy
* Update Tracer API with instrumentation version
Add option to the `Provider.Tracer` method to specify the
instrumentation version.
Update the global, noop, opentracing bridge, and default SDK
implementations.
This does not propagate the instrumentation library version to the
exported span. That is left for a follow-on PR.
* Revert trace_test.go
This is for the next PR.
* Update SDK to include version for default instrumentation
If the instrumentation library name is empty and the default
instrumentation is uses, include the SDK version.
* Update comments and documentation
* Remove default instrumentation version
* Point to the convenience functions in api/key package
This is to increase the visibility of the api/key package through the
api/core package, otherwise developers often tend to miss the api/key
package altogether and write `core.Key(name).TYPE(value)` and complain
at the verbosity of such a construction. The api/key package would
allow them to write `key.TYPE(name, value)`.
* Use the api/key package where applicable
This transforms all the uses of `core.Key(name).TYPE(value)` to
`key.TYPE(name, value)`. This also should help increasing the
visibility of the api/key package for developers reading the otel-go
code.
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>