1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00
Commit Graph

394 Commits

Author SHA1 Message Date
dependabot[bot]
737d81208b
Bump github.com/google/go-cmp from 0.5.1 to 0.5.2 (#1093)
* Bump github.com/google/go-cmp from 0.5.1 to 0.5.2

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.1...v0.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 11:39:41 -07:00
dependabot[bot]
170b6c6986
Bump github.com/google/go-cmp from 0.5.1 to 0.5.2 in /exporters/otlp (#1095)
* Bump github.com/google/go-cmp from 0.5.1 to 0.5.2 in /exporters/otlp

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.1...v0.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 11:31:47 -07:00
dependabot[bot]
2351c8cf7d
Bump github.com/google/go-cmp from 0.5.1 to 0.5.2 in /exporters/trace/jaeger (#1097)
* Bump github.com/google/go-cmp in /exporters/trace/jaeger

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.1...v0.5.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 11:10:58 -07:00
dependabot[bot]
9ce71fe2e5
Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/trace/zipkin (#1096)
* Bump google.golang.org/grpc in /exporters/trace/zipkin

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.0 to 1.31.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.0...v1.31.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 10:46:20 -07:00
dependabot[bot]
b933f31a20
Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/trace/jaeger (#1098)
* Bump google.golang.org/grpc in /exporters/trace/jaeger

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.0 to 1.31.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.0...v1.31.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 10:27:55 -07:00
dependabot[bot]
750848e993
Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/stdout (#1099)
* Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/stdout

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.0 to 1.31.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.0...v1.31.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-26 10:06:17 -07:00
dependabot[bot]
35bc9e7877
Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/otlp (#1094)
* Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /exporters/otlp

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.0 to 1.31.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.0...v1.31.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2020-08-26 09:52:28 -07:00
Anthony Mirabella
1f2eba2cdb
Release v0.11.0 (#1089)
* Prepare for releasing v0.11.0

* Update CHANGELOG.md to reflect scope of v0.11.0 release

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-24 22:38:37 -04:00
dengliming
77b7778a54
Integration tests for OTel Collector Attributes. (#1062)
* Integration tests for OTel Collector Attributes.

* Update CHANGELOG.md

* Fix review

* Fix review.

* Fix test.

* Fix test.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-18 08:45:50 -07:00
Tyler Yahn
f995380e58
Unify api/label and api/kv in new label package (#1060)
* Move `api/label` to `label`

* Move `api/kv` package contents into `label` package

* Unify label package name

* Move `api/internal/rawhelpers.go` to `internal`

* Propagate replacing `api/kv` with `label` pkg

* golint

* Fix over-aggressive change

* Update Changelog
2020-08-17 20:25:03 -07:00
dengliming
d94143ee13 Rename Callback Function. 2020-08-15 11:56:19 +08:00
dependabot[bot]
45b6a22cbb
Bump github.com/openzipkin/zipkin-go from 0.2.2 to 0.2.3 in /exporters/trace/zipkin (#1059)
* Bump github.com/openzipkin/zipkin-go in /exporters/trace/zipkin

Bumps [github.com/openzipkin/zipkin-go](https://github.com/openzipkin/zipkin-go) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/openzipkin/zipkin-go/releases)
- [Commits](https://github.com/openzipkin/zipkin-go/compare/v0.2.2...v0.2.3)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-14 08:04:21 -07:00
Joshua MacDonald
1cdf4ee8e6
Create a export.Checkpointer API; refactor metric export pipeline test helpers (#1055)
* Add regexp filter in api/label, test

* Add regexp option to sdk.Config

* Return indistinct values only when keyRe != nil

* Filter in sdk

* Add an accumulator filter test

* SDK tests pass

* Precommit

* Undo set filters

* Backout related filter changes

* Add a new test

* Checkpoint

* Comments

* Comments in label.Set

* Lint

* Add Checkpointer

* Test refactor continues

* Refactor reducer test

* Checkpoint

* Update push_test

* Update pull controller

* Comment

* Remove pending PRs

* Remove exportertest pkg

* Revert basic changes

* Revert testing changes

* Restore processortest changes

* Precommit & comments

* Comments on pull semantics

* Comments

* Fix buggy test; incorrect expectation following error

* Finish this test

* Comments

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-13 13:12:32 -07:00
Tyler Yahn
8f9f2d84cf
Move OTLP to the OTLP exporter (#1050)
* 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
2020-08-10 19:55:52 -07:00
Tyler Yahn
2dfa5e4fe1
Remove WithSpan method from Tracer interface (#1043)
* Remove WithSpan method from Tracer interface

Also remove implementation in SDK.

* Add panic event reporting to span End

* Update Changelog with changes

* Update CHANGELOG.md

* Update README.md

Fix code tabs

* Refactor span End

* Fix un-ended span from feedback.
2020-08-08 12:10:36 -07:00
Sam Xie
f9ba15f2d1
Replace WithSyncer with WithBatcher in examples (#1044)
* Replace `WithSyncer` with `WithBatcher` in examples

* update CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-07 09:16:43 -07:00
Tyler Yahn
1dbc75bc2f
Clean stale indirect dependency requirements (#1041)
* 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
2020-08-07 09:05:22 -07:00
Tyler Yahn
799c178925
Make opentracing bridge into own Go module (#1038)
* 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
2020-08-06 07:59:41 -07:00
Matej Gera
ccfa2e7bdf
Fix instrumentation lib version in spanDataToThrift (#1037)
* Fix instrumentation lib version in spanDataToThrift

* Update CHANGELOG.md

* Use test value for lib version in accordance with the spec

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-05 15:42:00 -07:00
dependabot[bot]
7316e34dd0
Bump google.golang.org/api from 0.29.0 to 0.30.0 in /exporters/trace/jaeger (#1034)
* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.29.0...v0.30.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-05 08:55:16 -07:00
Anthony Mirabella
ae278e9186
Remove othttp and httptrace instrumentations that have moved to contrib (#1032) 2020-08-04 23:30:23 -07:00
dependabot[bot]
ea0720c05e
Bump google.golang.org/grpc from 1.30.0 to 1.31.0 (#1004)
* Bump google.golang.org/grpc from 1.30.0 to 1.31.0

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
2020-08-04 14:08:36 -07:00
dependabot[bot]
cfe2b09c31
Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/stdout (#1005)
* Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/stdout

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-04 13:33:32 -07:00
dependabot[bot]
2f79fb8e8d
Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/otlp (#1003)
* Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/otlp

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-04 13:27:26 -07:00
dependabot[bot]
03e2d939ba
Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/trace/jaeger (#1002)
* Bump google.golang.org/grpc in /exporters/trace/jaeger

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-04 13:22:52 -07:00
dependabot[bot]
6b2c16ec99
Bump google.golang.org/grpc from 1.30.0 to 1.31.0 in /exporters/trace/zipkin (#1001)
* Bump google.golang.org/grpc in /exporters/trace/zipkin

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.30.0...v1.31.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-04 12:55:30 -07:00
Stefan Prisca
db2faf3b30
#869 - export array attributes to OTLP (#992)
* Add int array attribute support

* Export int32, int64 and bool arrays

* Export all other array attributes

* Remove array test case from simple attr test

* Addressed feedback

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-04 09:44:02 -07:00
Andy Schweig
5438916f62
Expose optional ResponseWriter interfaces. (#979)
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.
2020-07-30 10:30:47 -07:00
Tyler Yahn
fd61d2edec
Release v0.10.0 (#990)
* Prepare for releasing v0.10.0

* Update CHANGELOG

* Correct Changelog

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-07-30 08:57:24 -07:00
Tyler Yahn
8fbaa9d432
Make the SDK into its own Go module (#985)
* 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
2020-07-29 15:54:26 -07:00
Eundoo Song
e06c9da916
Rename aggregator/test to aggregatortest (#980)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-28 14:31:56 -07:00
Tyler Yahn
3b01a854d1
Make the stdout exporter a package (#963)
* Make the stdout exporter its own package

Follow the pattern of the other exporters.

* Update dependabot with stdout exporter

* Add replace directives for stdout exporter

* Remove outdated example test from metric SDK

* go mod tidy

* Update othttp example test

Remove unused stdout exporter.

* Remove tests in API that depend on stdout exporter

The global package does not need to be validated with the SDK. A more
properly constructed end-to-end integration test should be built if this
is actually needed.

* Add replace clause for otel in stdout go.mod
2020-07-24 20:44:51 -07:00
Tyler Yahn
c6611f4478
Move export test package to SDK (#962)
* Move export test package to SDK

* Rename package to metrictest

Follow Go std lib conventions in test package naming.

* Update import paths
2020-07-24 20:32:52 -07:00
Tyler Yahn
d99ac0993e
Remove sub-package value from kv (#968)
* Remove sub-package value from kv

* Update refs to `go.opentelemetry.io/api/kv/value`

* Update Changelog
2020-07-24 12:25:27 -07:00
Tyler Yahn
452256cbf4
Unify trace and metric stdout exporters (#956)
* Consolidate stdout exporter

* Move config to own file and match project standard

* Abstract Exporter into unified struct

* Rename trace part of the exporter

* Update import paths and configuration

* Update tests

* Update InstallNewPipeline to not return traceProvider

It is a registered global, access it that way.

* Update example_test

* Update docs

* Update example to be for whole package

* Update metric output

Closer match the span output.

* Clean up span output

Print as a batch and cleanup marshaling.

* Correct spelling error in doc

* Add Exporters README

* Update Changelog

* Propagate changes to rest of project

* Lint fixes

* Fix example test in metric SDK

* Add disable config options for trace and metric

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-07-22 12:34:44 -07:00
Matej Gera
f31d8ec1d0
Unify trace and metric exporter helpers (#944)
* Adjust Jaeger and Zipkin exporters helper methods

* Update and add tests, examples, various minor improvements

* Update changelog

* Correct the Zipkin example

- wait for the spans to be exported
- rebuild the example

* Zipkin service name as argument

* Rework Jaeger and Zipkin tests

* Include more detailed Changelog

Co-authored-by: ET <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-22 11:57:48 -07:00
dependabot[bot]
c5d77d234c
Bump github.com/google/go-cmp from 0.5.0 to 0.5.1 (#957)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2020-07-22 10:03:41 -04:00
alrex
c8b657eb6c
use global handler for span export err in otlp (#946)
Currently there is no way to report errors using the global handlers for spans in the OTLP exporter, this change fixes that. Errors for the metrics exporter are already handled by the global handler.

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-07-21 11:18:15 -07:00
Tyler Yahn
58e50e249f
Release v0.9.0 (#952)
* Prepare for releasing v0.9.0

* Update Changelog
2020-07-20 12:40:42 -07:00
Michal Hruby
d6ad4d4d6e
[jaeger] Stop ignoring uints (#945)
* Stop ignoring uints

* Ignore values that overflow
2020-07-17 09:00:58 -07:00
ET
166c703bd0
Import open-telemetry/opentelemetry-proto submodule and generate protobuf bindings locally (#942)
* Import open-telemetry/opentelemetry-proto submodule under internal

* Commit changes in updated/new protobuf files

* Refer to new location of .pb.go files after rewrite from import

* Describe in CHANGELOG
2020-07-16 13:59:14 -07:00
Tyler Yahn
aff7a80d5a
Release v0.8.0 (#929)
* Prepare for releasing v0.8.0

* Update Changelog

* Update Changelog
2020-07-10 09:23:53 -07:00
Michal Hruby
4dec0addb0
[jaeger] Added WithBatchMaxCount as an option (#931) 2020-07-10 10:28:45 -04:00
dependabot[bot]
d2913b735c
Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger (#925)
* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.28.0...v0.29.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-09 12:09:18 -07:00
Joshua MacDonald
3475d5575e
Fix incorrect aggregation; Prometheus exporter behavior (#903)
* 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>
2020-07-07 12:52:35 -07:00
Chen Yixiao
550d365c54
fix trace event time conversion from internal to otlp (#896)
* fix trace event time conversion from internal to otlp

* Enhance the effectiveness of SpanEvent test

* Empty
2020-07-05 09:32:40 -07:00
Liz Fong-Jones
f1e3536baf
Update opentracing dependency (#885)
Co-authored-by: lizthegrey <lizthegrey@users.noreply.github.com>
2020-07-01 17:51:06 -04:00
Tyler Yahn
49ac8eb238
Prepare for the v0.7.0 release (#876)
* Prepare for releasing v0.7.0

* Update Changelog for v0.7.0 release

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-06-26 13:54:33 -07:00
ET
0594313fca
Update google.golang.org/grpc from 1.27.1 to 1.30.0 (#870)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-24 16:07:08 -07:00
Tyler Yahn
7d631dbfaa
Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release (#866)
* Update OTLP to v0.4.0

* Update attribute transforms to use new KeyValue

* Update metric transforms

The labels are no longer included in the MetricDescriptor

Use new types.

* Fix OTLP integration tests

* Update example otel-collector go.sum

* Update metric integration testing

* Fix type error introduced in conflict resolution

* Deep clean of go.sum

Recreate go.sum for otel-collector example and OTLP exporter.
2020-06-24 14:02:13 -07:00
dependabot[bot]
9cdfdb2d3a
Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 (#824)
* Bump github.com/stretchr/testify from 1.4.0 to 1.6.1

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Update go.mod

* math.Inf(1)+math.Inf(-1)=NaN

Math is hard

* Remove indirect transitive dependency

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: Evan Torrie <evantorrie@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-06-24 11:16:21 -07:00
dependabot[bot]
18b096208c
Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus (#867)
* Bump github.com/prometheus/client_golang in /exporters/metric/prometheus

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.7.0...v1.7.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
2020-06-24 10:10:41 -07:00
ET
a8faf8cacc
Eliminate Uint64NumberKind from API (#864)
fixes #851

This includes all of the associated methods, such as
  AsUint64, AsUint64Atomic, AsUint64Ptr, CoerceToUint64, SetUint64
  SetUint64Atomic, SwapUint64, SwapUint64Atomic, AddUint64,
  AddUint64Atomic, CompamreAndSwapUint64, CompareUint64

Only significant change as a result was converting the histogram
aggregator's `count` state field into an int64 from a `metric.Number`.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 16:28:04 -07:00
Joshua MacDonald
2966505271
Rename Integrator to Processor (#863)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 12:00:15 -07:00
dependabot[bot]
4e71b4ef4f
Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger (#853)
* Bump google.golang.org/grpc in /exporters/trace/jaeger

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.29.1 to 1.30.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.29.1...v1.30.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 11:36:55 -07:00
dependabot[bot]
fdfb959a4a
Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin (#854)
* Bump google.golang.org/grpc in /exporters/trace/zipkin

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.29.1 to 1.30.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.29.1...v1.30.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 11:27:08 -07:00
Joshua MacDonald
ea53fb4d1a
Rename SynchronizedCopy to SynchronizedMove and update comment (#858) 2020-06-23 10:41:11 -07:00
Joshua MacDonald
d343f987f8
Rename simple integrator to basic integrator (#857)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 10:36:10 -07:00
Joshua MacDonald
0e2fdfc682
Support cumulative, delta, and pass-through exporters (#840)
* Update Process()

* Checkpoint

* Add subtractor; fix test

* Fix all simple integrator tests

* Build the rest (checkpoint)

* Pass all but Prometheus tests

* Precommit pass

* Add aggregation.Kind argument to ExportKindFor

* Remove Subtractor support

* Remove dead test code

* Restore the Subtractor code

* Fix the tests

* Comments

* Add tests for MetricKind

* Add ChangeSign test

* Test ExportKind

* New file

* Rename ChangeSign

* Remove a TODO, add a TODO

* Remove Stateful remnants

* Typo

* Typo

* Test an invalid export kind

* Comments

* Lint

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-22 22:59:51 -07:00
Liz Fong-Jones
e5267a3aa8
Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-22 17:59:28 -04:00
dependabot[bot]
14003ffac6
Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
Co-authored-by: lizthegrey <lizthegrey@users.noreply.github.com>
2020-06-22 16:50:42 -04:00
dependabot[bot]
92058a3548
Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lizthegrey <lizthegrey@users.noreply.github.com>
2020-06-22 14:54:56 -04:00
dependabot[bot]
0f65f61871
Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 14:35:53 -04:00
dependabot[bot]
d9c309ff52
Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 14:31:36 -04:00
dependabot[bot]
97cca8a208
Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 14:27:25 -04:00
dependabot[bot]
25887d5bff
Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 14:18:36 -04:00
dependabot[bot]
1149892431
Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 14:11:03 -04:00
dependabot[bot]
693fa3d990
Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ET <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 13:58:02 -04:00
dependabot[bot]
59c658380b
Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
2020-06-22 13:31:15 -04:00
dependabot[bot]
9a8674cbae
Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 13:01:08 -04:00
dependabot[bot]
818105ca73
Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 12:54:07 -04:00
dependabot[bot]
b0e67d2eb1
Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: evantorrie <evantorrie@users.noreply.github.com>
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-06-22 12:48:52 -04:00
Joshua MacDonald
4e4271791f
Add export timestamps; distinguish Accumulation vs. Record (#835)
* Introduce Accumulation

* Refactor export structs

* FTB exporters

* Test timestamps

* Test no-start case

* From feedback

* Apply suggestions from code review

(Thanks @MrAlias!)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Comments in sdk/metric/integrator/test

* Fix build

* Comments and feedback

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-18 10:16:33 -07:00
Joshua MacDonald
9925ebe517
Single-state Aggregator and test refactor (#812)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-13 00:55:01 -07:00
Tyler Yahn
288a3dd435
Metrics instrumentation version (#811)
* Support instrumentation library in metrics

* Update stdout exporter to display instrumentation info

* Fix tests that use the STDOUT exporter

* Refactor to keep SDK out of API

* Update global Meter and test Meter version

* Revert unneeded import syntax change

* Fix Unit comment

* Update comments

* Update comment

* Revert no-op change to import
2020-06-12 09:11:17 -07:00
Tyler Yahn
f06ae571ff
Merge branch 'master' into feature/jaeger-exporter-env 2020-06-10 10:28:51 -07:00
Sam Xie
659aac3275 Prevent panic while parsing tags 2020-06-10 17:03:26 +08:00
jmacd
6f0c6b4683 Split aggregation.go 2020-06-09 22:53:30 -07:00
Tyler Yahn
e53841a4b4
Support Instrumentation Library Info in Trace Export Pipeline (#805)
* 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.

* Support instrumentation library in SDK trace exports

* Update Jaeger exporter to export instrumentation
2020-06-09 22:15:53 -07:00
Sam Xie
4b8f8b90dc Remove WithDisabledFromEnv from NewRawExporter 2020-06-10 11:36:25 +08:00
Sam Xie
0966ad51ca Use the noop provider instead of the disabled exporter 2020-06-10 11:10:17 +08:00
Sam Xie
fe65825510 Use EnvStore to recover environment variables in testing 2020-06-10 11:10:17 +08:00
Sam Xie
a242bd7df2 Improve memory allocation while parsing tags 2020-06-10 11:10:17 +08:00
Sam Xie
e2ab0e0b98 Use environment variables as default options 2020-06-10 11:10:17 +08:00
Sam Xie
11032a87f8 Add license header 2020-06-10 11:10:17 +08:00
Sam Xie
d8d7b41695 Add environment variables for jaeger exporter
Handle these environment variables: JAEGER_SERVICE_NAME, JAEGER_DISABLED, JAEGER_TAGS, JAEGER_ENDPOINT, JAEGER_USER, JAEGER_PASSWORD
2020-06-10 11:10:17 +08:00
Sam Xie
a234027fde Add disabled field for jaeger exporter 2020-06-10 11:10:17 +08:00
Tyler Yahn
9ce42c89c5
Merge branch 'master' into send-headers 2020-06-09 15:31:27 -07:00
Alex Boten
6365fe9288 refactor following review feedback 2020-06-09 13:59:22 -07:00
alrex
f30ac1e329
Update exporters/otlp/otlp_integration_test.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-09 13:53:30 -07:00
Alex Boten
c28b510ec5 Send configured headers with every request 2020-06-09 12:30:40 -07:00
Joshua MacDonald
9401bd9cda
Remove Context arguments from Aggregator.Checkpoint and Integrator.Process (#803)
* Typo

* Swap order of ddsketch.New for consistency w/ histogram.New

* Remove Integrator.Process ctx argument

* Remove Aggregator.Checkpoint ctx argument

* Revert bugfix
2020-06-09 11:00:50 -07:00
Tyler Yahn
3e95c9c78e
Update error handling exporters to use global.Handle 2020-06-02 12:30:55 -07:00
Tyler Yahn
289f372308
Merge branch 'master' into otlp 2020-06-02 10:41:44 -07:00
Anthony J Mirabella
0e8fb1cb4f Ensure zipkin exporter reads and closes response body 2020-06-02 11:46:34 -04:00
Tyler Yahn
9c6c712c54
Merge branch 'master' into otlp 2020-06-01 09:15:29 -07:00
Tyler Yahn
0c3127c27e
Update README.md with batcher comment 2020-06-01 09:09:26 -07:00
Joshua MacDonald
86a10268b8
Minor cleanups in sdk/metric/aggregator (#781)
* Typo

* Swap order of ddsketch.New for consistency w/ histogram.New
2020-05-30 20:16:40 -07:00
Tyler Yahn
5d9472beab
Remove nolint and update misspell to ignore cancelled 2020-05-29 11:11:19 -07:00
Tyler Yahn
d917dd7d79
Lint 2020-05-29 11:04:57 -07:00
Tyler Yahn
b2ec53f483
Merge remote-tracking branch 'upstream/master' into otlp 2020-05-29 10:26:41 -07:00
Tyler Yahn
2b1998f1b4
Remove tests
The lack of programmatic enablement of retries means testing is going to
be flaky or cumbersome.
2020-05-29 10:23:01 -07:00
Tyler Yahn
45a679730d
"Working" tests with failure
Needs to be run `GRPC_GO_RETRY=on go test .` to not fail the failing
tests because retries are not enabled by default, nor can they be
enabled programmatically.
2020-05-29 10:18:36 -07:00
Tyler Yahn
07ccb274d2
Update options 2020-05-29 10:17:57 -07:00
Tyler Yahn
7cf20c3af9
Update README
Add information about setup, options, and retries.
2020-05-29 10:13:00 -07:00
Paul Thomson
6929c15957 Add application/json header 2020-05-29 06:24:22 +10:00
Tyler Yahn
a5e9204b58
Merge branch 'master' into pre_release_v0.6.0 2020-05-21 15:45:47 -07:00
Joshua MacDonald
b17a7845df
Rename Register* to New* (#761) 2020-05-21 15:42:14 -07:00
Tyler Yahn
ad37aae65c
Prepare for releasing v0.6.0 2020-05-21 12:10:12 -07:00
Tyler Yahn
e0256f9e94
First try at a failing suite 2020-05-21 12:05:59 -07:00
Tyler Yahn
0d3daf02b1
Merge branch 'master' into jmacd/prom_res 2020-05-21 11:55:41 -07:00
Tyler Yahn
40324a744a
Split into different files 2020-05-21 10:44:46 -07:00
Tyler Yahn
4bb182a91c
Break up to trace and metric suite 2020-05-21 10:31:57 -07:00
jmacd
dacebd6430 Use []float64 for boundaries 2020-05-21 10:29:03 -07:00
jmacd
3d2493463c Comments 2020-05-21 09:53:34 -07:00
Tyler Yahn
c38abde14b
Proof of concept 2020-05-21 09:45:24 -07:00
jmacd
48a8a869fe Upstream 2020-05-21 02:01:06 -07:00
jmacd
7172b30492 Add resources in the Prom tests 2020-05-21 01:38:43 -07:00
jmacd
196d7740bd Add resource support 2020-05-21 01:29:09 -07:00
jmacd
c829d3ea67 Tests pass 2020-05-21 00:36:17 -07:00
jmacd
0b5080372a Add benchmark 2020-05-21 00:19:08 -07:00
Anthony J Mirabella
923a6c8afc Replace sdktrace.WithResourceAttributes() with WithResource() 2020-05-20 16:08:43 -04:00
Joshua MacDonald
5461669733
Add a pull controller, use it for Prometheus (#751)
* Checkpoint new pull controller

* Tests pass

* Fix example

* Example fix

* Add a test

* Comment

* address MrAlias's feedback
2020-05-20 10:27:26 -07:00
Vladimir Mihailenco
244ed23e44
Rename ScheduleDelayMillis to BatchTimeout (#752)
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-05-20 10:12:57 -07:00
Joshua MacDonald
1fab21ddbf
Support use of synchronous instruments in async callbacks (#725)
* Support use of synchronous instruments in async callbacks

* Add a test
2020-05-19 21:33:10 -07:00
Joshua MacDonald
21d094af43
Refactor the api/metrics push controller; add CheckpointSet synchronization (#737)
* Checkpoint

* Finish tests

* Checkpoint

* Checkpoint (builds)

* Checkpoint + RWMutex interface

* Comments

* Remove commitLock

* Apply feedback
2020-05-18 18:37:41 -07:00
Joshua MacDonald
69da3056f2
Move Resource into the metric export Record (#739)
* Checkpoint

* Tests pass
2020-05-18 17:44:28 -07:00
Joshua MacDonald
ee3c9ed1a5
Rename Observer to ValueObserver (#734)
* Observer -> ValueObserver

* Move wrappers into async.go
2020-05-18 11:03:43 -07:00
Joshua MacDonald
76baa9cc7a
Remove the push controller named Meter map (#738)
* Remove the push controller named Meter map

* Checkpoint

* Remove Provider impls

* Add a test

* Expose Provider() getter instead of implementing the interface
2020-05-18 10:48:58 -07:00
Joshua MacDonald
2dee67652a
Histogram aggregator initial state (fix #735) (#736)
* Add a test

* Add comments and description options

* Another test

* Undo buffer re-use

* Mod tidy

* Precommit

* Again

* Copyright

* Undo rename
2020-05-18 09:44:33 -07:00
Joshua MacDonald
6bc14ffd2c
Replace Measure instrument by ValueRecorder instrument (#732)
* Measure->Value recorder and cleanups re: measure

* More edits

* More edits

* Feedback
2020-05-15 22:11:12 -07:00
Tyler Yahn
ce266f9656
Prepare for releasing v0.5.0 2020-05-13 17:11:23 -07:00
Joshua MacDonald
587cde3352
Remove NewKey and update doc comment (#721)
* Update doc comment

* Remove NewKey

* NewKey->Key
2020-05-13 16:21:23 -07:00
Chen Yixiao
1301b6f3e4
Move core and key to kv package (#720)
* Move core to kv

* Move kv.Value to kv.value.Value

* Move key to kv
2020-05-13 16:06:03 -07:00
Joshua MacDonald
64afb05e53
Metric SDK renames to align with draft SDK spec (#710)
* Replace batcher w/ integrator; rename ungrouped to simple

* SDK -> Accumulator

* Cleamup

* Address feedback
2020-05-11 10:23:06 -07:00
Chen Yixiao
f0855b7d08
Move Number to api/metric package (#706)
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-05-10 23:44:42 -07:00
Liz Fong-Jones
bafdd1b138
Merge branch 'master' into zipkin_mock_addr 2020-05-05 14:08:30 -04:00
tensorchen
375083a085 Update mockZipkin addr from :0 to 127.0.0.1:0 2020-05-06 01:50:00 +08:00
tensorchen
bae2298a36 Rename trace.TraceID & trace.TraceIDFromHex 2020-05-03 13:48:38 +08:00
tensorchen
c6c155de6f Move SpanContext from core package into trace 2020-05-02 20:17:11 +08:00
Joshua MacDonald
4c9a29d2d7
Add a key benchmark, use reflection in key.Infer() (#679)
* Add a key benchmark, optimize SDK SetAttribute

* Use reflect in key.Infer

* Move to separate benchmark file; remove pointer test; remove dead comment

* Run go mod tidy

* Add license header

* Use the reflect scalar accessors

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-04-30 13:06:00 -07:00
Igor German
5863f8562b
Add jaeger option that allows to specify custom http client (#671) 2020-04-28 14:35:34 -04:00
Rahul Patel
1de7f68bfc
Prepare for releasing v0.4.3 (#664) 2020-04-24 15:24:00 -07:00
Joshua MacDonald
3008c1bf02
Pass Resources through the metrics export pipeline (#659) 2020-04-24 09:44:21 -07:00
Joshua MacDonald
cd1be0e698
Use the label.Set.Equivalent value instead of an encoding in the batcher (#658) 2020-04-24 09:32:49 -07:00
Joshua MacDonald
0bb12d9b1b
New api/label package, common label set impl (#651)
* New label set API

* Checkpoint

* Remove label.Labels interface

* Fix trace

* Remove label storage

* Restore metric_test.go

* Tidy tests

* More comments

* More comments

* Same changes as 654

* Checkpoint

* Fix batch labels

* Avoid Resource.Attributes() where possible

* Update comments and restore order in resource.go

* From feedback

* From feedback

* Move iterator_test & feedback

* Strenghten the label.Set test

* Feedback on typos

* Fix the set test per @krnowak

* Nit
2020-04-23 12:10:58 -07:00
Joshua MacDonald
acb350b8f3
Support JSON marshal of Resources (#654)
* Support JSON marshal of Resources

* Add a test

* Another test

* Fix arch bug

* Fix other test
2020-04-22 14:32:58 -07:00
NiaoGe
d20fc722f2
Fix typo trace.Exporter to trace.SpanSyncer (#653)
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-04-21 20:34:53 -07:00
Milad
ddad4d45ae
trace exporter: using type names for return values (#648)
* trace exporter: using type names for return values

* Update jaeger.go

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-04-21 20:30:57 -07:00
Krzesimir Nowak
927d9155ae
Increase the visibility of the api/key package (#650)
* 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>
2020-04-21 20:26:51 -07:00
Oleg Shatnyuk
cf7c4e5328
fix zipkin without local endpoint with service name (#644) 2020-04-18 23:02:29 -07:00
Tyler Yahn
ebc245b388
Batch Metrics Exported From the OTLP Exporter (#626)
* Add check to sum transform for unknown NumberKind

* Initial batching

* Move CheckpointSet transform to internal package

* Add tests for the Exporter Export method

Check batching and general output exporter ResourceMetrics are correct.

* Check errors in tests

* Apply suggestions from code review

Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>

* Use var instead of multiple calls for group IDs

* Fix otlp metric test reporting

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
2020-04-15 12:04:44 -07:00
Joshua MacDonald
a8f7b3247b
Remove WithKeys() option, defaultkeys batcher (#639) 2020-04-14 16:07:11 -07:00
Oncilla
bcb8b645ab
prometheus: add error wrapping (#631)
* prometheus: add error wrapping

This PR adds error wrapping to the prometheus exporter.
The added context should make it easier to follow the error path.

This is a follow-up to #622

* feedback
2020-04-13 09:48:20 -07:00
Tyler Yahn
0a9e861549
Update the OTLP exporter batching of traces (#623)
Instead of batching based on the Resource pointer which is not guaranteed
to uniquely identify common Resources, use the `String` method which is.

Renames the external test package to be identified as the integration
testing. This testing structure (the mock exporter) batches exported
resources transmitted from the resource. This is needed as there is no
guarantees that a batch will be exported in a single payload, therefore,
it is not an ideal place to add resource batch testing for the exporter
itself.

Add unit tests to ensure the Exporter is correctly batching spans by
resource.
2020-04-08 16:49:53 -07:00
Tyler Yahn
856aad92ef
Update OTLP SpanData transform (#614)
* Update OTLP SpanData transform

The ParentSpanId needs to be empty for root spans according to the OTLP
[docs](6c2a86ed2f/gen/go/trace/v1/trace.pb.go (L284-L286)).
This updates the SpanData transform function to not add the ParentSpanID
if it is not a valid span ID (which includes if it is the nil span ID
used for an unset ID).

Additionally, this adds a test to prevent regression.

* Simplify test to just check parent span ID transform

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-04-07 15:14:23 -07:00
Oncilla
6005d01854
prometheus: check return value from CheckpointSet.ForEach (#622)
This PR modifies prometheus.Collect to reflect the change introduced
by #557.

The `export{Counter,Histogram,LastValue,Summary}` methods now all return
an error instead of calling the error callback directly.
The callback is now only called on the returned error from `ForEach`.

fixes #563

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-04-07 10:58:49 -07:00
Owais Lone
446727b90d
Updated default port for OTLP exporter (#611)
OpenCensus used `55678` as the default. OTLP used `55680`. This commit fixes the incorrect default port specified for the OTLP exporter.
2020-04-02 10:04:57 -07:00
Oncilla
8ef02a61aa
prometheus: add histogram support to exporter (#601)
This PR adds histogram support to the prometheus exporter.

- Adds a new aggregator selector that returns a histogram for `MeasureKind`.
  The selector can be constructed using `simple.NewWithHistogramMeasure`
- Adds support for histogram aggregators in prometheus collect method.

With this PR, the default selector is changed to use histograms.

In order to support the prometheus histogram, the `aggregator.Histogram`
interface is extended with the `Sum` method.

fixes #487

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-04-01 14:36:37 -07:00
Rahul Patel
857e80c270
Prepare for releasing v0.4.2 (#608) 2020-03-31 12:57:37 -07:00
Bogdan Drutu
1f6ffa9ed7
Fix time conversion from internal to otlp (#606)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2020-03-31 10:32:01 -07:00
Liz Fong-Jones
02b6be15e0
Pre release v0.4.1 (#605)
* fix release script for ubuntu

* Prepare for releasing v0.4.1
2020-03-31 13:02:15 -04:00
Rahul Patel
57d5f55600
Prepare for releasing v0.4.0 (#603)
* Prepare for releasing v0.4.0

* update README.

* remove target date for released features.
2020-03-30 14:33:27 -07:00
Andrew Hsu
5d346a4190
update godoc.org links to pkg.go.dev (#602)
Banner at the top of godoc.org pages are already asking users to
redirect to pkg.go.dev as mentioned in blog post
https://blog.golang.org/pkg.go.dev-2020

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>
2020-03-30 15:40:38 -04:00
Joshua MacDonald
e8546e3bc5
Remove Labelset (#595)
* Remove LabelSet frmo api/metric

* SDK tests pass

* Restore benchmarks

* All tests pass

* Remove all mentions of LabelSet

* Test RecordBatch

* Batch test

* Improves benchmark (some)

* Move the benchmark to match HEAD

* Align labels for GOARCH=386

* Add alignment test

* Disable the stress test fo GOARCH=386

* Fix bug

* Move atomic fields into their own file

* Add a TODO

* Comments

* Remove metric.Labels(...)

* FTB

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-03-27 14:06:48 -07:00
Tyler Yahn
e7a9ba1e2e
Remove unneeded allocation on empty labels (#597)
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-03-25 20:17:43 -07:00
Tyler Yahn
c97b4f726c
Update project License headers and checking (#596)
Update license header to standard format for source files missed prior.

Add license header to new source files.

Add Makefile check to test all `*.go` and `*.sh` files have a copyright
notice (or comment about them being auto-generated) within the first few
lines.
2020-03-25 14:47:17 -07:00
Tyler Yahn
c9dcc1be28
Move span transforms of the OTLP exporter to internal (#593)
* Move span transforms of the OTLP exporter to internal

Breakup and move functionality of the `transform_spans.go` file into
appropriate files in the `internal/transform` sub-package. This is in
preparation of using some of the overlapping functionality to implement
Resource support in the metric side of the exporter.

Adds more specific unit tests for some of the functionality transferred.
The tests removed used the exporter as a processing engine and the
replacement tests do not do this. The test found in the `oltp_test.go`
seem to comprehensively cover this type of test.

Include Link `Name` in the exporter span link and adds a test to check
for this.

Resolves #527

* Apply suggestions from code review

Co-Authored-By: Rahul Patel <rghetia@yahoo.com>

* Fix SpanData doc

* Consolidate span comparison

Co-authored-by: Rahul Patel <rghetia@yahoo.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-03-25 09:04:31 -07:00
Joshua MacDonald
4c69dd3234
Remove dogstatsd and statsd support (#591) 2020-03-24 11:00:59 -07:00
Krzesimir Nowak
d648712cf2
Kick label encoder out of sdk (#574)
* Temporarily opt-out export.Labels from label encoding stuff

* Stop passing label encoding stuff to export.Labels

* Drop label encoding stuff from SDK

* Dogstatd exporter does not need to implement label exporter anymore

* more dogstatd exporter fixes

* export labels get back to encoding stuff

in a lame way, but improvements are coming in following commits

* Get encoded labels through export.Labels

* make SDK to provide its own implementation of export.Labels

* drop dead code

* add noop label exporter

* make export simple labels immutable

* Move the default label encoder to export package

* Simplify the simple export labels a bit

* Reserve some label exporter IDs

* Document and shuffle the code a bit

* Prepare for bring the iterator benchmark test back

We can install a callback to the Batcher's process function - this is
the place where we can access the labels, and thus test the label
iterator.

* Bring back the iterator benchmarks

* Simplifications and docs

* Fix copyright to be consistent with the rest

* Fix typo

* Put reserved label encoder IDs into constants

We get fewer comments about magic numbers that way.

* Fix the label encoder as label exporter thinko
2020-03-24 09:30:12 -07:00
Rahul Patel
6f881b4400
update to proto v0.3.0 (#588) 2020-03-24 08:45:07 -07:00
Tyler Yahn
a485d0ec64
Update License header for all source files (#586)
* Update License header for all source files

- Add Apache 2.0 header to source files that did not have one.
- Update all existing headers dated to 2019 to be 2020
- Remove comma from License header to comply with the Apache 2.0
  guidelines.

* Update Copyright notice

Use the standard Copyright notices outlined by the
[CNCF](https://github.com/cncf/foundation/blob/master/copyright-notices.md#copyright-notices)
2020-03-23 22:41:10 -07:00
Rahul Patel
a1c243965e
Prepare for releasing v0.3.0 (#578) 2020-03-21 14:06:39 -07:00
Krzesimir Nowak
a01f63bec4
Replace Ordered with an iterator in export.Labels. (#567)
* Do not expose a slice of labels in export.Record

This is really an inconvenient implementation detail leak - we may
want to store labels in a different way. Replace it with an iterator -
it does not force us to use slice of key values as a storage in the
long run.

* Add Len to LabelIterator

It may come in handy in several situations, where we don't have access
to export.Labels object, but only to the label iterator.

* Use reflect value label iterator for the fixed labels

* add reset operation to iterator

Makes my life easier when writing a benchmark. Might also be an
alternative to cloning the iterator.

* Add benchmarks for iterators

* Add import comment

* Add clone operation to label iterator

* Move iterator tests to a separate package

* Add tests for cloning iterators

* Pass label iterator to export labels

* Use non-addressable array reflect values

By not using the value created by `reflect.New()`, but rather by
`reflect.ValueOf()`, we get a non-addressable array in the value,
which does not infer an allocation cost when getting an element from
the array.

* Drop zero iterator

This can be substituted by a reflect value iterator that goes over a
value with a zero-sized array.

* Add a simple iterator that implements label iterator

In the long run this will completely replace the LabelIterator
interface.

* Replace reflect value iterator with simple iterator

* Pass label storage to new export labels, not label iterator

* Drop label iterator interface, rename storage iterator to label iterator

* Drop clone operation from iterator

It's a leftover from interface times and now it's pointless - the
iterator is a simple struct, so cloning it is a simple copy.

* Drop Reset from label iterator

The sole existence of Reset was actually for benchmarking convenience.
Now we can just copy the iterator cheaply, so a need for Reset is no
more.

* Drop noop iterator tests

* Move back iterator tests to export package

* Eagerly get the reflect value of ordered labels

So we won't get into problems when several goroutines want to iterate
the same labels at the same time. Not sure if this would be a big
deal, since every goroutine would compute the same reflect.Value, but
concurrent write to the same memory is bad anyway. And it doesn't cost
us any extra allocations anyway.

* Replace NewSliceLabelIterator() with a method of LabelSlice

* Add some documentation

* Documentation fixes
2020-03-19 15:01:34 -07:00
Joshua MacDonald
d8682c1999
Refactor the SDK helpers, create MeterImpl (#560)
* Create MeterImpl interface

* Checkpoint w/ sdk.go building

* Checkpoint working on global

* api/global builds (test fails)

* Test fix

* All tests pass

* Comments

* Add two tests

* Comments and uncomment tests

* Precommit part 1

* Still working on tests

* Lint

* Add a test and a TODO

* Cleanup

* Lint

* Interface()->Implementation()

* Apply some feedback

* From feedback

* (A)Synchronous -> (A)Sync

* Add a missing comment

* Apply suggestions from code review

Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>

* Rename a variable

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
2020-03-19 12:02:46 -07:00
Rahul Patel
80b720a771
update stdout trace with resource. (#558)
* update stdout trace with resource.

* convert resource to span attributes.

* remove resource reference after converting to Span Attributes.
2020-03-16 16:48:35 -07:00
Tyler Yahn
435c39aab4
Update OTLP exporter with latest proto (#550)
[Upstream
changes](https://github.com/open-telemetry/opentelemetry-proto/pull/126)

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-03-16 16:43:54 -07:00
Rahul Patel
74a528520b
update jaeger exporter to translate resources to tags. (#551) 2020-03-16 16:38:21 -07:00
ET
217a97d9b6
Replace ErrNoLastValue and ErrEmptyDataSet by ErrNoData (#557)
Handle ForEach returning an error
2020-03-16 16:28:33 -07:00
Rahul Patel
6ada85adba
add resource option to Provider. (#545)
- update otlp exporter to export resources.
2020-03-13 13:07:36 -07:00
Tyler Yahn
cba1664b46
Add metrics support to the OTLP exporter (#544)
* Initial metrics addition to the OTLP exporter

* Fixes

Update to incorporate merged changes.
Fix lint issues.

* Add sum float64 transform unit test

* Fix static check

* Update comments

Fix malformed License header.
Add documentation for new transform functions.
Remove errant TODO.

* Fix test failures and handle ErrEmptyDataSet

Use `assert.NoError` instead of `assert.Nil` to correctly display
checked errors.

Use the result of `assert.NoError` to guard against `nil` pointer
dereferences.

Add check to skip `Record`s that return an `ErrEmptyDataSet` error and
include test to check this error is correctly returned from the
transform package.

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-03-13 11:42:20 -07:00
Yoshi Yamaguchi
fcc4aca8c7
Fix typo in module name (#548) 2020-03-12 20:48:49 -07:00
Joshua MacDonald
23e65ac79d
Remove metric options; rename "counter" aggregator to "sum" (#541)
* Remove options (mostly)

* Rename counter aggregator to 'sum'

* Fix prometheus test

* Rewordings from feedback
2020-03-11 20:21:34 -07:00
Krzesimir Nowak
d9210f5676
Zipkin exporter (#495)
* Add zipkin exporter

The zipkin exporter implements the SpanBatcher interface. It follows
the current-at-the-time-of-writing document about conversion from
OpenTelemetry span data to Zipkin spans. Which means that endpoint
information is not yet filled.

* Fix typo in docs

* Add a zipkin example

This sends span information to a locally running zipkin collector.
Currently I have a problem getting the collector to show me the spans
after accepting them with HTTP 202. Not sure if this is because of
missing endpoint information.

* Make gitignore consistent

The fixed paths should be prefixed with a slash. The "relative" paths
mean that git will ignore all the files that end with the path.

* Add tests for zipkin exporter
2020-03-11 14:49:02 -07:00
Joshua MacDonald
4047c0877a
Introduce metric constructor errors, MeterMust wrapper (#529)
* Update api for Must constructors, with SDK helpers

* Update for Must constructors, leaving TODOs about global errors

* Add tests

* Move Must methods into metric.Must

* Apply the feedback

* Remove interfaces

* Remove more interfaces

* Again...

* Remove a sentence about a dead inteface
2020-03-11 11:57:57 -07:00
Gustavo Silva Paiva
85751428a3
add shorter version for global providers (#538) 2020-03-11 08:23:32 -07:00
Joshua MacDonald
9674c81cb7
Drop the gauge instrument (#537)
* drop gauge instrument

* Restore the benchmark and stress test for lastvalue aggregator, but remove monotonic last-value support

* Rename gauge->lastvalue and remove remaining uses of the word 'gauge'

Co-authored-by: Krzesimir Nowak <krzesimir@kinvolk.io>
2020-03-10 16:00:37 -07:00
Matej Gera
fe0099fb3d
[tracing] add simplified export pipeline setup for Jaeger (#459)
* add simplified export pipeline setup for Jaeger

* add With* options to configure SDK options.

* add test for WithRegistration and WithSDK

* rename Registeration with RegisterGlobal

* rename WithRegistration to RegisterAsGlobal

Co-authored-by: rahulpa <rahulpa@google.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-03-10 13:58:45 -07:00
Nail Islamov
af5428829b
Update OTLP protos, fix imports (#532)
* Update OTLP protos, fix imports

* Update go.sum

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-03-09 22:09:40 -07:00
Joshua MacDonald
3bf3927eb5
Add status message parameter (#524)
* Add status message parameter

* Cleanups around use of codes.OK

* Update for status message
2020-03-07 10:38:59 -08:00
Rahul Patel
5850278197
opentelemetry collector trace exporter (#497)
* opentelemetry collector exporter

- missing load test
- missing resources

* fix review comments.

* add test for each SpanKind and Attribute Type.

* rename otelcol to otlp

* move exporter/trace/otlp to exporters/otlp

* more review comments.

* add alignment test.

* pass context to uploadSpans
2020-03-06 22:01:02 -08:00
Tyler Yahn
9459629d21
Remove the StackDriver trace exporter (#452)
Vendor exporters needed to be hosted outside this codebase.

Additionally, remove the http-stackdriver example.

Resolves #447

Partially addresses #449

Co-authored-by: Rahul Patel <rahulpa@google.com>
2020-03-06 17:53:52 -08:00
Liz Fong-Jones
ffdbc05665
update to v0.2.3 (#512)
Promote everything to v0.2.3, golang 1.14, and give everything a nice go get -u ./... and go mod tidy along the way too.
2020-03-04 16:12:25 -05:00
Tyler Yahn
52fb033e13
Rename the exporter directory to exporters (#502)
The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was
mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. This
resulted in all subsequent releases not becoming the default latest,
meaning that `go get`s pulled in the incompatible `v0.1.0` release of
that package when pulling in more recent packages from other otel
packages. Renaming the `exporter` directory to `exporters` fixes this
issue by consequentially renaming the package.

Additionally, this action also renames *all* exporters. This is
understood to be a disruptive action to existing users as they will need
to update any dependencies they currently have on our exporters.
However, it was decided to take this action regardless. The need to
resolve the existing issue explained above is highly important, and
given the Alpha state of this project these kinds of breaking changes
should be expected (though not without reason).

Resolves #331

Co-authored-by: Rahul Patel <rghetia@yahoo.com>
2020-03-02 13:54:57 -08:00