* Provide conformance tests for tracers
The test harness may be used to ensure that a given tracer behaves
according to the expectations set by the API.
* Add `ToMatchError` matcher
* Use DeepEqual to compare unknown types in matchers
Unlike basic `==`/`!=`, `reflect.DeepEqual` can compare arbitrary
types (e.g., `[]string` to `[]string`)
* Use struct instead of string for test context key
* Add golint to linters and resolve issues.
I decided to remove constructors for some of the propagation types
because the constructors can be reduced to either using the zero value
or a single, non optional member.
* Enable gofmt and commit fixes
Since these methods are about the span itself rather than specifically
*events* on the span, it makes sense to drop "events" from their names.
[Closes#33]
The file defines noopMeter, noopHandler and noopLabelSet. Renaming it to
the more generic `noop.go` makes it clearer that several structs are
defined there.
* initial metrics work
* rename cumulative to counter
* rename bidirectional to nonmonotonic
* rename unidirectional to monotonic
* rename nonnegative to signed
this changes the default semantics a bit - before the change measure
could record negative values by default, now it can't.
The specification draft currently specifies both NonNegative and
Signed, but I think it's a mistake.
* rename instrument to descriptor
* license
* rework measurement values
* make measurement value a tagged union
* simplify to one kind of metrics
* add observers
* change some interfaces to match the spec
* keep integral measurement separate from floating ones
* remove duplicated measurement type
* add checking for options
* reorder some fields and functions
* rename a function
to avoid confusion between the Handle type and the Measure type
* drop disabled field from descriptor
* add back typed API for metrics
* make metric options type safe
* merge alternatives into a single bool
* make value kind name less stuttery
* fix observation callback prototype
* drop context parameter from NewHandle
* drop useless parameter names
* make descriptor an opaque struct
* use a store helper
* handle comment fixes
* reword Alternate comment
* drop the "any value" metrics
* make measurement value simpler
* document value stuff
* add tests for values
* docs
* do not panic if there is no span ID in the event
* rename finish -> end
* missed a few finish -> end spots
* change end back to finish for the bridge span in the openTracing bridge
* fixed grammar, ran make
* Allow specifying custom timestamps for events
Adding event with timestamp is not yet a part of the OpenTelemetry
specification, but this function will come in handy when implementing
the OpenTracing bridge.
* Add opentracing bridge, wrapper tracer and migration interfaces
There are some features missing - setting up links and span kind;
context propagation will only work between two OpenTracing bridges.
* Add some tests for the opentracing bridge
The tests mostly check various aspects of the cooperation between
OpenTracing and OpenTelemetry APIs.
* Remove globals from exp/streaming
* basic example
* Build the streaming example
* Update README.md for running streaming example
* Remove observer package
* Move observer to exporter
* Fix
* Re-run make circle-ci
* add propagation api.
* add http propagator interface and w3c propagator implementation.
* remove Extract api from trace.
* remove Extract interface for tracer.
* fix copyright.
* fix variable names and comments.
* move inject/extract out of trace.
* replace INVALID_SPAN_CONTEXT with EmptySpanContext function.
* fix tag.Map.
* make carrier as interface instead of http.Request.
* rename structs and update doc comments..
* add doc.go
* update doc.
* add noop propagator.
* add new propagation api with Supplier interface.
- added Default Tracer which simply propagates SpanContext.
- added CopyOfRemote option to simply create remote span.
* remove old propagator.
* rename propagator to TextFormatPropagator.
* rename default tracer/span as pass_through tracer/span.
* add test for pass through tracer.
* add missing interface to pass through tracer.
* return SpanContext instead of contex.Context from Extract interface.
- also remove PassThroughTracer
* fix review comments.
* add more test cases for traceContext extraction.
* remove tidy temporarily from circle-ci target to avoid build failure.
* allow header ending in dash '-'.
* add inject test for non-zero value other than 01 for traceoption
* add AddLink and Link interface to MockSpan
* fix running go mod tidy on every build.
This is to shrink the PR #100.
The only place where the registry.Variable type was used was metrics,
so just inline that type into its only user. The use of the
registry.Variable type in core.Key was limited to the Name field.
The stats package also used the registry.Variable type, but seems that
also only the Name field was used and the package is going to be
dropped anyway.
* Merge two event methods in span API
There was an agreement to get rid of the Event interface and
consolidate the two methods for adding events into one. See #57.
* Eliminate the use of the Event interface
There is no need for the SDK to provide the implementation of the
Event interface - it is used nowhere.
* Drop the Event interface
It's dead code now.
* Make it possible to override a finish timestamp through options
Opentracing to opentelemetry bridge will certainly use this feature.
* Obey the start time option
* Add tests for events and custom start/end times
This is to make tag.Map an immutable type, so it is safe to use
concurrently. The safety is not yet fully achieved because of the
functions returning contents of the map (Value and Foreach). The
functions give callers an access to core.Value objects, which contain
a byte slice, which has pointer like semantics. So to avoid accidental
changes, we will need to copy the value if it is of BYTES type.
Fixes#59
* add tests for api/trace/current.go
* add interface validaion for type: mockSpan
* rework for exported NoopSpan and ditch useless tabletest for TestSetCurrentSpan()
* trace sdk initial commit.
* fix imports and comments.
* remove tracestate
* split trace.go
* add attribute over limit test.
* add comments and restructure span.go and tracer.go
* refactor MessageEvent
* defer unlock
* some more cleanup in span.go
* rename *MessageEvent* to *Event*
* cleanup comments in trace_test.go
* fix typos.
* return full string ID for traceID and spanID.
* Move scope.Active to trace.CurrentSpan
* Remove scope / does not build
* Global tracer
* Checkpoint
* Checkpoint
* Add key/key.go for key.New
* Comments
* Remove more EventID and ScopeID
* Use Handle to describe static objects
* TODOs
* Remove empty file
* Remove singletons
* Update TODOs
* TODO about map update
* Make stats package option aliases (like key has)
* Rename experimental/streaming
* streaming SDK builds w/ many TODOs
* Get the examples building
* Tidy up metric API / add interface check
* Remove logic from the registry; this is now a placeholder
* fix compile errors.
* fix lint errors.
* add circle-ci job.
* rename IDHigh to TraceIDHigh
* rename the file.
* add go get for goimports and golangci-lint
* enable GO111MODULE and remove comments.
* remove working dir and update cache name
* Add TEST_RESULT env back.
* run go mod tidy.
* remove go mod download.
* add test coverage.
* fix TraceID.
* fix circlefi config error.
* remove install-tools.
* remove ALL_TEST_SRC from Makefile.