* 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
* Add tests for nonabsolute and varying sign values
* Implement support for NonAbsolute Measurement MaxSumCount
Previously, the MaxSumCount aggregator failed to work correctly with
negative numbers (e.g. MeasureKind Alternate()==true).
* Pass NumberKind to MaxSumCount New() function
Allows it to set the initial state (current.max) to the correct value
based on the NumberKind.
* Revert extraneous local change
* Pass full descriptor to msc New()
This is analagous to the DDSketch New() constructor
* Remember to run make precommit first
* Add tests for empty checkpoint of MaxSumCount aggregator
An empty checkpoint should have Sum() == 0, Count() == 0 and Max()
still equal to the numberKind.Minimum()
* Return ErrEmptyDataSet if no value set by the aggregator
Remove TODO from stdout exporter to ensure that if a maxsumcount or
ddsketch aggregator returns ErrEmptyDataSet from Max(), then the
entire record will be skipped by the exporter.
Added tests to ensure the exporter doesn't send any updates for
EmptyDataSet checkpoints - for both ddsketch and maxsumcount.
* Relayout Aggreggator struct to ensure int64s are 8-byte aligned
On 32-bit architectures, Go only guarantees that primitive
values are aligned to a 4 byte boundary. Atomic operations on 32-bit
machines require 8-byte alignment.
See https://github.com/golang/go/issues/599
* Addressing PR comments
The use of Minimum() for the default uninitialized Maximum value means
that in the unlikely condition that every recorded value for a measure
is equal to the same NumberKind.Minimum(), then the aggregator's Max()
will return ErrEmptyDataSet
* Fix PR merge issue
* 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
* Checkpoint
* Checkpoint
* 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
* Dogstats
* Let Export return an error
* Checkpoint
* 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
* Checkpoint
* Funciontal example using unixgram
* Tidy the example
* Add a packet-split test
* More tests
* 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
* Update comments; use a pipe vs a unix socket in the example test
* Update test
* Spelling
* Typo fix
* Rename DefaultLabelEncoder to NewDefaultLabelEncoder for clarity
* Rename DefaultLabelEncoder to NewDefaultLabelEncoder for clarity
* Test different adapters; add ForceEncode to statsd label encoder
get_main_pkgs.sh uses 'mapfile' which is not available in Bash
versions earlier than 4.x. On machines where the default installed
bash is 3.x (OSX), this causes `make precommit` to break.
However, it's easy enough to install a recent version of
bash (e.g. via homebrew) in `/usr/local/bin/bash`. With
`/usr/local/bin` in your path, and `/usr/bin/env bash` as the shebang
line, this enables `make precommit` to pass with flying colors.
* 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
* clean dead code from noop tracer
* rename arguments from the Tracer interface's methods
* remove service, resources and component options from sdk/tracer and mock tracer
* remove unused fields from sdk/tracer
* exporter(stackdriver): fix ExportSpans when ctx is not nil
- problem: if ctx is not, calling cancel() will panic
- nil Context already handled in newContextWithTimeout
- add with test
* update go.sum
* mock traceserver for traceclient
* make precommit
* - respect option.Context when get google cred and traceclient
* Revise with timeout, context
- rename blackbox tests package to stackdriver_test
- remove context is nil checking, add to initialization
- add tests for timeout
* Array aggregator part 1
* Improve median testing
* More testing
* More testing
* Update other dist tests
* Add to the benchmark
* Move errors into aggregator package, use from ddsketch; update Max/Min/Quantile to return errors for array/ddsketch/maxsumcount
* Lint
* Test non-absolute ddsketch
* Lint
* Comment
* Add note
* handle race condition: close handled before open
* add dummy noop span.
* add test for clienttrace
* accept multiples `ConnectStart`/`ConnectDone` trace hooks.
* formatting
* change argument name and add error/attributes to end method.
* add tests for connection race condition
* use strconv instead of fmt.Sprint
* rollback float it has no significant improvement on time and worse allocated bytes.
* change int32 and uint32 to separate cases.
* fix comments and add jaeger tests
* add more jaeger tests
* remove TODOs and add more jaeger tests
* remove TODOs and add more jaeger tests
* fix jaeger tests
* add jaeger agent tests
* fix merge conflicts and fix test
* fix test name