* 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 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
* 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
http.ResponseWriters may implement additional interfaces
(http.CloseNotifier, http.Flusher, http.Hijacker, http.Pusher,
io.ReaderFrom) that get lost when the ResponseWriter is wrapped in
another object. This change uses the httpsnoop package to wrap the
ResponseWriter so that the resulting object implements any of the
optional interfaces that the original ResponseWriter implements as
well as using the replacement ResponseWriter methods that gather
information for tracing.
* Remove otel/sdk dependency from grpctrace
Use otel/trace/testtrace instead and cleanup testing code.
* Update httptrace to not depend on the SDK
Update testing to use api/trace/testtrace instead.
* Add changes to Changelog
* Make the SDK its own Go module
* Upgrade go.mod to 1.14 project wide
* go mod tidy
* Avoid applying stale udpates; add a test
* Add Memory option to basic processor
* Always use memory in the pull controller
* Test the memory option
* Precommit
* Add a Prometheus-specific test
* More comment on Memory option
* Link to 862
* Remove sleep
* Update changelog
* Comment on stale and stateless aggregators
* Update sdk/metric/processor/basic/config.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Move dependencies of tools package to a tools directory
* remove TOOLS_MOD_DIR from ALL_GO_MOD_DIRS in a Makefile.
then run 'go mod tidy' on ALL_GO_MOD_DIRS and TOOLS_MOD_DIR.
Co-authored-by: Rahul Patel <rghetia@yahoo.com>
* Prom exporter structure
* update prometheus exporter with master and add example.
* remove distributedcontext from prometheus example
* docs and interface checker
* make precommit
* make precommit & remove "OnRegisterError"
* coerce values to float
* return register errors and maybe fix precommit?
* add option to specify a prometheus.Registry
* make exporter implement http.Handler interface
* fix map keys bugs
* remove unused const
* fix modules dependencies.
* add support for histogram
* get metrics with labels values only instead of a labels map
* make exporter implements label encoder interface
* encode labels if the encoder is different.
* split metrics on several files and encapsulate them in structs
* make pre commit
* unexport 'sanitize'
* remove 'AllValues' in favor of 'Points' and change to 'NewDefaultLabelEncoder'
* add prometheus tests
* remove newlines on struct declaration
* formatting
* rewording
* imports
* add todo on labelValues
* blame myself for todo (:
* add todos on sanitize
* add support for summaries. custom remove label encoder.
* imports
* imports
* update with upstream
* copy of simplelru for attributes without excessive usage of interface{}
This also make sure we only add attributes/links if isRecording.
Move method to export the attributes list to attributeMap.
* run make precommit to update mod files.
* Add MetricAggregator.Merge() implementations
* Update from feedback
* Type
* Ckpt
* Ckpt
* Add push controller
* Ckpt
* Add aggregator interfaces, stdout encoder
* Modify basic main.go
* Main is working
* Batch stdout output
* Sum udpate
* Rename stdout
* Add stateless/stateful Batcher options
* Undo a for-loop in the example, remove a done TODO
* Update imports
* Add note
* Rename defaultkeys
* Support variable label encoder to speed OpenMetrics/Statsd export
* Lint
* Doc
* Precommit/lint
* Simplify Aggregator API
* Record->Identifier
* Remove export.Record a.k.a. Identifier
* Checkpoint
* Propagate errors to the SDK, remove a bunch of 'TODO warn'
* Checkpoint
* Introduce export.Labels
* Comments in export/metric.go
* Comment
* More merge
* More doc
* Complete example
* Lint fixes
* Add a testable example
* Lint
* Let Export return an error
* add a basic stdout exporter test
* Add measure test; fix aggregator APIs
* Use JSON numbers, not strings
* Test stdout exporter error
* Add a test for the call to RangeTest
* Add error handler API to improve correctness test; return errors from RecordOne
* Undo the previous -- do not expose errors
* Add simple selector variations, test
* Repair examples
* Test push controller error handling
* Add SDK label encoder tests
* Add a defaultkeys batcher test
* Add an ungrouped batcher test
* Lint new tests
* Respond to krnowak's feedback
* Undo comment
* Use concrete receivers for export records and labels, since the constructors return structs not pointers
* Bug fix for stateful batchers; clone an aggregator for long term storage
* Remove TODO addressed in #318
* Add errors to all aggregator interfaces
* Handle ErrNoLastValue case in stdout exporter
* Move aggregator API into sdk/export/metric/aggregator
* Update all aggregator exported-method comments
* Document the aggregator APIs
* More aggregator comments
* Add multiple updates to the ungrouped test
* Fixes for feedback from Gustavo and Liz
* Producer->CheckpointSet; add FinishedCollection
* Process takes an export.Record
* ReadCheckpoint->CheckpointSet
* EncodeLabels->Encode
* Format a better inconsistent type error; add more aggregator API tests
* More RangeTest test coverage
* Make benbjohnson/clock a test-only dependency
* Handle ErrNoLastValue in stress_test
* Add Stackdriver Trace exporter for trace.
TODOs for future work is:
* to replace bundler.Bundler
* to add proper tests for the exporter
* to move the exporter to proper repository once it will be created.
* Change to use functions for the exporter initialization instead of
passing option struct directly.
This fix is aliging the same fix for Jaeger (#146, #161)
* Change Option struct to be function type
* Change the original Option struct to be private
* Add line comments to maxMessageEventsPerSpan to leave it for future implementation
* Fix unnessesary expressions specified by `make precommit`
Left errors by `make precommit` in experimental/bridge/opentracing.
* Ran make precommit
* Add new line at EOF
* WIP: Start implementing BatchSpanExporter interfaces
* Change to use RegisterSpanProcessor to register bsp
* Change function names to fit current implementation of sdk
* Removed google.golang.org/api/support/bundler and implement ssp and bsp
* Change spanProcessor as a member of Exporter.
* Fix option names used for BatchSpanProcessor initialization.
* Change Exporter.Shutdown just to unregister spanProcessor.
* Removed copyright statements of OpenCensus.
* Fix small typo and EOF new line
* Fix interfaces of ExportSpan/ExportSpans to meet SpanSyncer/SpanBatcher
* Change to follow context.Context passed in ExportSpan/ExportSpans
* Fix Stackdriver Exporter to hold sync.Once to lock when it is registered and
unregistered.
* 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.
* 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.
Enabling misspell and goimports in golangci-lint allows a bit of
simplification of tools.go / Makefile.
The linters enabled locally also complained about the markdown in
README.md a little, so I fixed those complaints.
I also enabled auto-fix mode in golangci-lint so that it will just
fix any lint issues it runs across (which is how goimports/misspell)
was being used.
misspell still needs to be included in tools.go unless we decide that
we didn't want it to run on markdown files.