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

486 Commits

Author SHA1 Message Date
dependabot[bot]
dd3d4f2ae0
Bump github.com/openzipkin/zipkin-go from 0.2.3 to 0.2.4 in /exporters/trace/zipkin (#1150)
* 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.3 to 0.2.4.
- [Release notes](https://github.com/openzipkin/zipkin-go/releases)
- [Commits](https://github.com/openzipkin/zipkin-go/compare/v0.2.3...v0.2.4)

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: Anthony Mirabella <a9@aneurysm9.com>
2020-09-09 12:29:08 -04:00
dependabot[bot]
2f0538ac37
Bump google.golang.org/grpc in /example/otel-collector (#1147)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.1...v1.32.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 12:21:55 -04:00
dependabot[bot]
224629bd0b
Bump google.golang.org/api from 0.30.0 to 0.31.0 in /exporters/trace/jaeger (#1124)
* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.30.0 to 0.31.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.30.0...v0.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-09-08 09:03:17 -07:00
ET
4d83d5b571
Change name of ProbabilitySampler to TraceIdRatioBased (#1115)
* Change name of ProbabilitySampler to TraceIdRatioBased

* Modify behavior to ignore parent span
* Add test for inclusivity property on TraceIdRatioBased sampler
* Modify tests in `trace_test.go` to reflect change in parent
  span behavior

* Add to CHANGELOG

* Satisfy golint

* Update CHANGELOG.md

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-03 07:28:01 -07:00
Trevor Foster
a304e8280d
Add reconnecting udp connection type to jaeger exporter (#1063)
* port reconnecting udp client from jaeger-client-go

* Fix precommit issues

* Fix license check

* Add initial value for max packet size

* Fix for atomic usage on 386 arch

* Modify reconnecting option to an affirmative

* Add changelog entry

* Dont hold rlock for writes

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-01 09:08:11 -07:00
Tyler Yahn
1ab708e4b8
Rename global SetTraceProvider and TraceProvider (#1102)
* Rename global {Set,}TraceProvider

Resolves #1101

* Rename unexported and testing vars
2020-08-31 10:02:04 -07:00
dependabot[bot]
5d9daf0654
Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /sdk (#1105)
* Bump google.golang.org/grpc from 1.31.0 to 1.31.1 in /sdk

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-27 12:19:01 -07:00
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
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
Anthony Mirabella
e44c9dee78
Remove example/README.md that referenced moved HTTP example (#1066)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-17 19:59:01 -07: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
Tyler Yahn
f0620dc0ad
Move grpctrace to contrib repo (#1027)
* Remove grpctrace package

This is being moved to the contrib repo with
https://github.com/open-telemetry/opentelemetry-go-contrib/pull/189
as part of #976.

* Update Changelog

* Remove the grpc example

Moved to contrib repo

* Fix spelling error

* Update Changelog
2020-08-05 20:24:39 -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
Tyler Yahn
96a5f8ff46
Rename api/standard package to semconv (#1016)
* Rename api/standard package to semconv

* Update `api/standard` package dependencies to `semconv`

* Update Changelog

* Add PR number to Changelog
2020-08-04 07:51:09 -07:00
Stefan Prisca
fc1ce6cb8f
fix otel collector example (#1006)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-31 11:34:46 -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
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
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
Tyler Yahn
58e50e249f
Release v0.9.0 (#952)
* Prepare for releasing v0.9.0

* Update Changelog
2020-07-20 12:40:42 -07:00
ET
4f3fab3ba7
Remove github.com/open-telemetry/opentelemetry-collector dependency (#943) 2020-07-16 17:18:45 -04: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
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
Anthony Mirabella
c219029606
Update otel-collector example to use collector v0.5.0 (#915)
* Update otel-collector example to use collector v0.5.0

* 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-07-07 10:26:47 -07:00
ET
bd1e174e60
Add "peer.service" semantic to standard attributes (#898)
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-07-06 11:36:49 -04: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
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
William Tong
526b815f47
Merge otlp collector examples (#841)
* Add metric instrumentation to example

* Add prometheus configs

* Add prometheus kubernetes configs

* Correct Prometheus config files

* Tweak prometheus configs

* Change instrument to Counter

* Elaborate example README

* Polish submission

* Correct otel config

* Tweak details

* Update licensing text

* Modify licensing text

* Fix typos

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-06-23 08:37:07 -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
David C Wang
ce49579d66 Fixed OTLP example's accidental early close of exporter
* The exp.Stop() as argument to handleErr is getting executed
  immediately.  Wrap this with an anonymous func so that this
  argument is executed when the defer statement is activated.
* From the "Tour of Go" docs on Defer: "The deferred call's arguments
  are evaluated immediately, but the function call is not executed
  until the surrounding function returns."
2020-06-09 20:36:17 +00:00
Tyler Yahn
9318a73297
Run precommit 2020-06-04 08:29:10 -07:00
Tyler Yahn
cafdc869ea
Merge branch 'master' into otlp-example 2020-06-04 08:19:57 -07:00
wtong98
f86491e1ec Add replace directive to example go.mod 2020-06-02 14:31:30 -05:00
wtong98
cffb360324 Merge branch 'master' into otlp-example.
Sync the local branch with upstream changes
2020-06-02 14:28:46 -05:00
wtong98
4ac30219ae Fix go.mod dependencies 2020-06-02 14:11:23 -05:00
wtong98
70d737b128 Split OTLP README to own directory 2020-06-01 13:27:23 -05:00
Tyler Yahn
9c6c712c54
Merge branch 'master' into otlp 2020-06-01 09:15:29 -07:00
wtong98
de094be4fc Touch up details 2020-06-01 08:41:57 -05:00
Tyler Yahn
07d5f77749
Rename plugin directory to instrumentation (#779)
* Rename plugin directory to instrumentation

As per https://github.com/open-telemetry/opentelemetry-specification/pull/539

* Update package paths

* Fix tracer names in othttp instrumentation
2020-05-30 14:53:32 -07:00
Tyler Yahn
d917dd7d79
Lint 2020-05-29 11:04:57 -07:00
wtong98
94c630dbbb Correct README links 2020-05-27 10:13:11 -05:00
wtong98
80d1eb98ed Finish OTLP example 2020-05-27 10:06:33 -05:00
wtong98
a4cf6e1d69 Add OTLP metrics 2020-05-26 15:24:16 -05:00
wtong98
69ddc81a81 Add OTLP trace 2020-05-26 11:17:14 -05: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
Stefan Prisca
7329ccc823
Change OTLP example to use syncer (#756)
* change otlp-example to use syncer

* precommit

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-05-21 11:40:11 -07:00
Anthony J Mirabella
068ad5b3a5 make precommit to cleanup otel-collector/go.sum 2020-05-20 16:42:34 -04: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
Stefan Prisca
3f24acf4c0 Merge branch 'master' of github.com:stefanprisca/opentelemetry-go into sp-master 2020-05-20 10:39:50 +02:00
Stefan Prisca
e1b144e775 Wait for batcher to push changes 2020-05-20 10:38:34 +02:00
Stefan Prisca
1f16b8a573 Merge branch 'master' of https://github.com/open-telemetry/opentelemetry-go into sp-master 2020-05-20 10:28:40 +02: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
Stefan Prisca
7c9f0696ca
Update Makefile 2020-05-19 07:29:52 +02: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
ee3c9ed1a5
Rename Observer to ValueObserver (#734)
* Observer -> ValueObserver

* Move wrappers into async.go
2020-05-18 11:03:43 -07:00
Stefan Prisca
8bcefd434e remove unnecessary jaeger files & add licence header 2020-05-16 12:37:47 +02:00
Stefan Prisca
c80ed298db
Update example/otel-collector/k8s/otel-collector.yaml
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-16 12:16:04 +02:00
Stefan Prisca
2a00038175
Update example/otel-collector/k8s/namespace.yaml
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-16 12:15:53 +02: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
ET
0122b586b7
Ensure golang alpine image is running golang-1.14 (#733)
Older versions of go (even only as recently as 1.12.7) have problems
building outside of $GOPATH
2020-05-15 21:53:05 -07:00
Stefan Prisca
e31b09388a change api/core package to api/kv 2020-05-15 12:57:21 +02:00
Stefan Prisca
d623815dfc Update README with latest changes 2020-05-15 11:46:53 +02:00
Stefan Prisca
612e894247 fix otlp receiver endpoint 2020-05-14 18:52:38 +02:00
Stefan Prisca
2e6011db7a change collector image 2020-05-14 18:18:22 +02:00
Stefan Prisca
2c718982df Merge branch 'master' of https://github.com/open-telemetry/opentelemetry-go into sp-master 2020-05-14 11:11:55 +02:00
Stefan Prisca
e9f185c396 add k8s files 2020-05-14 11:11:51 +02: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
Stefan Prisca
46477e2fa4 fix precommit 2020-05-13 12:55:33 +02:00
Stefan Prisca
af27b4381a Merge branch 'master' of github.com:stefanprisca/opentelemetry-go into sp-master 2020-05-13 12:40:02 +02:00
Stefan Prisca
d69386f56c add resource attributes to provider 2020-05-13 12:38:23 +02:00
Stefan Prisca
bbb7763a84 add full collector config 2020-05-13 11:10:19 +02:00
Stefan Prisca
a09fd990c2
Update example/otel-collector/main.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:04:22 +02:00
Stefan Prisca
41ca31f31a
Update example/otel-collector/main.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:04:15 +02:00
Stefan Prisca
4c1109bee8
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:04:09 +02:00
Stefan Prisca
1e878b9564
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:04:02 +02:00
Stefan Prisca
a81fb66b04
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:53 +02:00
Stefan Prisca
95888a7700
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:44 +02:00
Stefan Prisca
9c442a0972
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:34 +02:00
Stefan Prisca
7db551e39e
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:26 +02:00
Stefan Prisca
e2e4e77624
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:19 +02:00
Stefan Prisca
4c7262b167
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:12 +02:00
Stefan Prisca
6ba581865f
Update example/otel-collector/README.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-05-12 13:03:03 +02:00
Stefan Prisca
105e0df893 precommit 2020-05-11 12:42:36 +02:00
Stefan Prisca
97f88560df fix readme 2020-05-11 12:35:11 +02:00
Stefan Prisca
be01af5ea3 small rephrasing 2020-05-11 12:21:40 +02:00
Stefan Prisca
74347efaaa Mention default config 2020-05-11 12:17:41 +02:00
Stefan Prisca
8921ddfe25 Add readme to the example 2020-05-11 12:10:12 +02:00
Stefan Prisca
a27a37ee34
Update main.go 2020-05-08 14:34:29 +02:00
Stefan Prisca
c6c841fc7c add simple demo for connecting to collector 2020-05-08 14:25:20 +02:00
Rahul Patel
1de7f68bfc
Prepare for releasing v0.4.3 (#664) 2020-04-24 15:24:00 -07:00
Andrew Hsu
6402598a1f
add Dockerfile and docker-compose.yml to run example code (#635)
* add optional server url arg to http client example

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add Dockerfile to build example http images

Multi-stage Dockerfile with targets for building example http server and
client.

  $ docker build --tag the-server --target example-http-server .
  $ docker build --tag the-client --target example-http-client .

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add docker-compose.yml file for running examples

This docker compose configuration file will help a new user to compile
and run the example code quickly. Uses the Dockerfile to build images
with compiled examples.

  $ docker-compose build http-server http-client
  $ docker-compose up http-server http-client

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add newline to last message of example http client

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add optional collector url arg to zipkin client example

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add Dockerfile target to build zipkin client

For building the example zipkin client:

  $ docker build --tag zipkin-client --target example-zipkin-client .

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add docker compose service to run zipkin examples

Services to run the zipkin client along with a zipkin collector:

  $ docker-compose build zipkin-client
  $ docker-compose up zipkin-collector zipkin-client

Since the zipkin collector takes a few seconds before it is ready to
receive traces, I added a simple retry loop to the client command.

The collector service exposes port 9411 so user can visit
http//localhost:9411/ to see the trace sent to the collector. Be sure to
search by the trace id logged by the client.

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* Update Dockerfile with AL2 declaration

As described in https://www.apache.org/licenses/LICENSE-2.0#apply

Co-Authored-By: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update docker-compose.yml with AL2 declaration

As described in https://www.apache.org/licenses/LICENSE-2.0#apply

Co-Authored-By: Tyler Yahn <MrAlias@users.noreply.github.com>

* pass server url as flag in example http client

  $ ./client -h
  Usage of ./client:
    -server string
          server url (default "http://localhost:7777/hello")

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* pass zipkin url as flag in example zipkin client

  $ ./zipkin -h
  Usage of ./zipkin:
    -zipkin string
          zipkin url (default "http://localhost:9411/api/v2/spans")

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* move Dockerfile and docker-compose.yml into example dir

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add Dockerfile and docker-compose.yml for zipkin example

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* update zipkin example README.md

With instructions on how to use docker-compose to run the example.

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* add http example README.md

With instructions on how to use docker-compose to run the example.

Signed-off-by: Andrew Hsu <xuzuan@gmail.com>

* Update example/http/Dockerfile WORKDIR

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

* Update example/http/Dockerfile RUN go install

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

* Update example/http/Dockerfile RUN go install

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

* Update example/zipkin/Dockerfile WORKDIR

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

* Update example/zipkin/Dockerfile RUN go install

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-04-23 13:11:24 -07:00
Paul Reichelt
6de3dab6b6
Resolve #72 - gRPC Interceptor (#621)
* Move interceptor to plugin

* Add basic net.peer info

* Ensure that grpc status match span status

See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-rpc.md#status

* Set rpc.service attribute

* Add StreamClientInterceptor and StreamServerInterceptor

* Fix: golint errors

* Apply automated go.mod changes from make

* Implement suggestions to improve readability
2020-04-23 13:07:14 -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
Joshua MacDonald
a8f7b3247b
Remove WithKeys() option, defaultkeys batcher (#639) 2020-04-14 16:07:11 -07:00
Rahul Patel
857e80c270
Prepare for releasing v0.4.2 (#608) 2020-03-31 12:57:37 -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
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
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
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
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
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
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
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
Krzesimir Nowak
8ebc7bbad0
Name context functions consistently (#481)
It would be nice to follow a single schema for naming context
functions. In the trace package we followed the form FooFromContext
and ContextWithFoo. Do the same in the correlation package. The schema
WithFoo is mainly used for functions following the options pattern.

Not sure about a name of the NewContext function, though. For now I
have left it alone.

Co-authored-by: Rahul Patel <rghetia@yahoo.com>
2020-02-27 09:10:52 -08:00
Junki Kaneko
4818358f94
Move dependencies of tools package to a tools directory (#466)
* 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>
2020-02-06 10:51:00 -08:00
Krzesimir Nowak
942713a02d
Replace span relationship with a potentially remote parent context (#451)
This PR removes the non-compliant ChildOf and FollowsFrom interfaces
and the Relation type, which were inherited from OpenTracing via the
initial prototype. Instead allow adding a span context to the go
context as a remote span context and use a simple algorithm for
figuring out an actual parent of the new span, which was proposed for
the OpenTelemetry specification.

Also add a way to ignore current span and remote span context in go
context, so we can force the tracer to create a new root span - a span
with a new trace ID.

That required some moderate changes in the opentracing bridge - first
reference with ChildOfRef reference type becomes a local parent, the
rest become links. This also fixes links handling in the meantime. The
downside of the approach proposed here is that we can only set the
remote parent when creating a span through the opentracing API.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-02-04 08:55:03 -08:00
Krzesimir Nowak
6b4acf47b8 Reorganize propagation code (shrink PR 381) (#444)
* Rename distributedcontext package to correlation

Correlation is the name we agreed upon.

* Move trace propagators to api/trace

The trace propagators tests had to be moved to a testtrace subpackage
to avoid import cycles between api/trace and internal/trace.

Needed to shut up golint about stutter in trace.TraceContext -
TraceContext is a name of a W3C spec, so this stutter is
expected. It's certainly still better than golint's suggestion of
having trace.Context.

* Rename api/propagators to api/propagation

This package will not contain any propagators in the long run, just
the interface definitions.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-01-28 10:13:46 -08:00
Liz Fong-Jones
ea67a56427
go module update for release v0.2.1 (#413) 2020-01-08 09:41:58 -05:00
Liz Fong-Jones
4c9bf78ab3 s/options/config/ (#410)
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-01-03 09:48:45 -08:00
Matej Gera
067aa9e142 [metrics] standardize/simplify export pipeline setup (#395)
* Introduce simplified export pipeline setup for stdout

* Standardize dogstatsd,stdout,prometheus calling.

* Creates NewRawExporter, NewExportPipeline, InstallNewPipeline methods.
* Uses Options rather than Config throughout for options.

* fix merge conflicts.

Co-authored-by: Liz Fong-Jones <elizabeth@ctyalcove.org>
2020-01-02 10:41:21 -08:00
Joshua MacDonald
dd781560d4
Rename handle to bound instrument (@sircelsius) (#400)
* Rename metric Handle to Bound Instrument

* Rename metric Handle to Bound Instrument

* Rename metric Handle to Bound Instrument

* chore(meter): renamed from *BoundInstrument to Bound*, renamed AcquireBoundInstrument to Bind

* chore(meter): renamed Release to Unbind

* Self feedback in doc.go

* Rename confusing method name

Co-authored-by: Marc Bramaud <sircelsius@users.noreply.github.com>
2019-12-27 16:30:19 -08:00
Joshua MacDonald
1414d363de
Global meter forwarding implementation (#392)
* Initial skeleton

* Revert noop provider removal

* Checkpoint

* Checkpoint

* Implement Bound instrument and LabelSet

* Add test

* Add a benchmark

* Add a release test

* Document LabelSetDelegator

* Lint and comments

* Add a second Meter test; fix typo; add a panic

* Add a test for the builtin SDK

* Address feedback
2019-12-23 23:03:04 -08:00
Gustavo Silva Paiva
6f04903876 Change prometheus to not aggregate metrics and only export them. (#385)
* draft using stop aggregating on prometheus client (counters)

* remove prometheus client aggregations

Measures are being exported as summaries since histograms doesn't
exist on OpenTelemetry yet.

Better error handling must be done.

* make pre commit

* add simple error callback

* remove options from collector

* refactor exporter to smaller methods

* wording

* change to snapshot

* lock collection and checkpointset read

* remove histogram options and unexported fields from the Exporter

* documenting why prometheus uses a stateful batcher

* add todo for histograms

* change summaries objects to summary quantiles

* remove histogram buckets from tests

* wording

* rename 'lockedCheckpoint' to 'syncCheckpointSet'

* default summary quantiles should be defaulted to no buckets.

* add quantiles options

* refactor test.CheckpointSet and add docs

* flip aggregators merge

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2019-12-23 09:47:51 -08:00
Tyler Yahn
99cb01b246 Correct http-stackdriver example module name (#394)
Fix misspelling of opentelemetry.
2019-12-20 11:55:31 -05:00
Vineeth Pothulapati
b863b8f6ab Rename CurrentSpan to SpanFromContext & SetCurrentSpan to ContextWithSpan (#379)
Signed-off-by: vineeth <vineethpothulapati@outlook.com>
2019-12-11 08:51:32 -08:00
Jonas-Taha El Sesiy
1ab645fedb Consistently use pointer receivers for core.Number (#375)
Change all occurrences of value to pointer receivers
Add meta sys files to .gitignore
Code cleanup e.g.
- Don't capitalize error statements
- Fix ignored errors
- Fix ambiguous variable naming
- Remove unnecessary type casting
- Use named params

Fix #306
2019-12-09 13:03:11 -08:00
rghetia
d35ea75879
go module update for release v0.2.0 (#366) 2019-12-03 00:08:30 -08:00
ferhat elmas
eb9fe13a77 Drop SetAttribute from Span (#361)
fixes #302
2019-12-03 16:58:55 +11:00
David Montoya
77543cd80e Unary gRPC tracing example (#351)
* add grpc example

* update example guide

* decouple trace provider initialization

* add source license

* update api references
2019-11-26 16:14:09 -08:00
Gustavo Silva Paiva
3d78564d2f Prometheus exporter (#334)
* 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
2019-11-26 11:47:15 -08:00
Cheng-Lung Sung
1b08d827a4 Rename GetMeter() to Meter() (#357) 2019-11-26 09:54:05 -08:00
Cheng-Lung Sung
13cd2ac417 move /global to /api/global (#356)
implement #337
2019-11-25 20:41:24 -08:00
ferhat elmas
0f052af2f4 Rename GetTracer to Tracer (#347)
* Rename GetTracer to NewTracer

* Drop New prefix
2019-11-25 09:46:07 -08:00
Joshua MacDonald
b9706b20f9
Dogstatsd metrics exporter (#326)
* 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
2019-11-21 20:46:05 -08:00
rghetia
9d1a0d538f
go module update for release v0.1.2 (#330) 2019-11-18 11:14:49 -08:00
Gustavo Silva Paiva
3495d74971 specialize simplelru(span's lruMap) for attributes only (#328)
* 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.
2019-11-18 10:51:57 -08:00
Joshua MacDonald
9878f3b700 Metrics stdout export pipeline (#265)
* 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
2019-11-15 13:01:20 -08:00
Cheng-Lung Sung
a228bafec5 exporter(stackdriver): fix ExportSpans when ctx is not nil (#294)
* 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
2019-11-14 09:45:17 -08:00
Cheng-Lung Sung
17439d879c [example/jaeger] Remove prefix slash in Tracer.Start() (#292)
- trivial fix, original example generates "component-main//foo", which
  should be "component-main/foo"
2019-11-05 09:18:09 -08:00
Cheng-Lung Sung
6b48fce4ec example/basic: make basic example work (#279)
* example/basic: make basic example work

- use stdout as exportor (otherwise no output when you run it)

* meter does not work yet, rephrase TODO
2019-11-04 12:23:23 -08:00
Liz Fong-Jones
e99cac2ccc
bump dependent module versions for Stackdriver/Jaeger (#285)
* bump dependent module versions.

* update example hashes too.
2019-11-04 15:39:23 +01:00
Liz Fong-Jones
440b6653c9 remove rSSP and rBSP code, use NewProvider instead. (#271) 2019-11-01 16:35:18 -07:00
rghetia
15bfc5bb12
Namespace import path under "/otel" (#274)
Also fixes example module paths so that they use the vanity URL instead
of the github URL.

[Closes #184]
2019-11-01 11:40:29 -07:00
Liz Fong-Jones
f829598cbd Update go.mod for stackdriver exporter (#267)
* Update go.mod

* update example import
2019-10-31 15:08:26 -07:00
Eran Levy
579e0ce7c6 add more test cases to jaeger exporter and fix comments (#242)
* 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
2019-10-31 10:52:46 -07:00
Joshua MacDonald
8862436993 Support named Meters, use global package (#258)
* Support named Meters, use global package

* Comments/typos fixed
2019-10-30 23:35:02 -07:00
Joshua MacDonald
de6715fca3
Remove the distributedctx.Mutator (#252)
* Remove the distributedctx.Mutator

* Remove unused field

* Update examples
2019-10-30 13:21:13 -07:00
Joshua MacDonald
320c62a780
Remove BYTES values, as they are are not thread safe (#249)
* Remove BYTES values, as they are mutable

* Remove more BYTES
2019-10-30 10:20:53 -07:00
Joshua MacDonald
937f4ff8b0
Metrics SDK work-in-progress (#172)
Introduce the new SDK, four aggregators, and an export interface.
2019-10-29 13:27:22 -07:00
Krzesimir Nowak
7d301220a2 Automate getting the list of examples to build (and switch to go 1.13 to avoid module problems) (#246)
* automate building all the examples

the EXAMPLES variable was out of date - the stackdriver example wasn't
even built

let's automate it, so we don't need to remember about updating the
variable after adding a new example to the examples directory

* move jaeger example to example directory

this should be in the examples directory, so it can be built by the
make test during CI.

* switch to go 1.13

circle ci uses go 1.12 (which is the oldest 1.12 release) that
contains some bugs with module handling

let's switch to go 1.13.3, the latest go currently

* use a single valid revision of the project in go.mod files

this probably shouldn't be a problem since the switch to go 1.13 in
circle ci, but cleans up the mess and the use of bogus releases
2019-10-29 08:45:48 -07:00
rghetia
68310ab974
move global trace provider api to global package. (#240)
* move global trace provider api to global package.

* fix doc.
2019-10-25 11:38:52 -07:00
Eran Levy
79c5fd7c2b init go modules for jaeger exporter (#237)
* Jaeger exporter should be its own go module open-telemetry/opentelemetry-go#205

* fix review comments and build #205

* resolve mod conflicts #205
2019-10-24 09:13:01 -07:00
Alyson van Hardenberg
8cb3786789 init go modules for stackdriver exporter (#236)
* init go modules for stackdriver exporter

* add replace rule

* add import to stackdriver example code

* update example/namedtracer/go.sum
2019-10-23 09:48:56 -07:00
Krzesimir Nowak
a6d0f04c8d Remove leftover mentions of jaeger in http example (#238)
Jaeger exporter was replaced with stdout exporter in the example, so
update the README to reflect that. Also drop the screenshot - it's not
referenced anywhere.
2019-10-23 09:38:00 -07:00
Krzesimir Nowak
b3247f04fc Update metrics API to match current spec (#228)
* Update metrics API to match current spec

* update options to match the spec

* drop the global meter API

* more docs

* get rid of leftover mentions about descriptor
2019-10-22 23:29:24 -07:00
rghetia
b04db14146
WIP: Named tracer prototype (#227)
* named tracer prototype

* rename Manager to Provider.

* fix compile error after merge.

* rename Tracer method to GetTracer

* provider with options.

* update test.

* cleanup make circl-ci

* remove global config.

* some cleanup.

* use provider for bridge

* update propagation test.

* update examples and plugins.

* remove GlobalTracer methods.

* fix review comments.

* some more cleanup.

* remove unnecessary getTracer call in benchmark test.
2019-10-22 13:19:11 -07:00
Liz Fong-Jones
75562dd381 add RegisterSimpleSpanProcessor() modeled on stackdriver code (#213)
* add RegisterSimpleSpanProcessor() modeled on stackdriver code

* update examples
2019-10-16 15:13:39 -07:00
Edward Muller
0fd077287b Bump golangci-lint to v1.21.0 (#215) 2019-10-16 10:05:15 -07:00
Alyson van Hardenberg
384b4bb86a rename tag package to distributedContext (#178)
* rename package tag to package distributedContext

* rename Tag -> Entry

* change distributed context -> dctx to avoid capitalization collision

* change dctx -> distributedcontext

* update stackdriver client example
2019-10-10 14:30:22 -07:00
Yoshi Yamaguchi
9ed97980e2 Add Stackdriver Trace exporter for trace. (#160)
* 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.
2019-10-08 23:33:19 -07:00
Joshua MacDonald
be8fb0b4e2 Golang metrics prototype (#100)
* 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
2019-10-08 15:45:49 -07:00
Alyson van Hardenberg
bf2e5e9f09 update client and server example comments (#170) 2019-10-04 12:05:24 -07:00
Artem Kartasov
cd5ee69468 Named Tracer: temporary remove unnecessary tracer methods (#158) 2019-10-02 21:19:32 -07:00
rghetia
211007efb2
add binary propagation. (#155) 2019-10-02 13:54:39 -07:00
Steven Karis
fa7d053793 Add stdout trace exporter (#153)
* Add stdout trace exporter (#134)

* Update go.mod and go.sum

* Do not use assert in tests
2019-09-28 11:27:02 -07:00
Alyson van Hardenberg
0eb73325ce rename finish to end (#150)
* 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
2019-09-27 10:48:10 -07:00
rghetia
a853377a2f
Update example to use jaeger exporter and update Readme (#143)
* update http example to use jaeger exporter and sdk.

* update image location.

* remove extra parameters for jaeger.
2019-09-25 13:22:33 -07:00
Krzesimir Nowak
908b73d792 run golangci-lint in all directories with go.mod (#138)
* Run golangci-lint in all directories with go.mod

* Imports fix by golangci-lint

* Propagate failures from commands running in loops
2019-09-25 09:38:55 -07:00
Krzesimir Nowak
339ca2d974 Initial opentracing bridge (#98)
* 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.
2019-09-24 23:12:22 -07:00
stgrzeszczak
8af7978f42 Fix compilation with Golang 1.13 (#137)
* Fix compilation with Golang 1.13

* run go mod tidy again
2019-09-24 08:26:21 -07:00
rghetia
83935b2558
Add propagator interface and W3C propagator (#85)
* 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.
2019-09-23 11:51:32 -07:00
Krzesimir Nowak
3362421c9b Drop the registry package (#130)
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.
2019-09-19 11:20:02 -07:00
Krzesimir Nowak
0583d26d0b Build example and ensure go mod files are tidy (#131)
* Build examples when running tests

* Run go mod tidy in precommit

That way CI can catch the case when go.mod or go.sum are outdated.
2019-09-19 09:16:09 -07:00
Krzesimir Nowak
a776e95c61 Consolidate AddEvent and Event methods, add FinishOptions (#99)
* 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
2019-09-03 11:03:51 -07:00
Isobel Redelmeier
0db77910a7 Create separate go modules for examples (#26)
This prevents core code from including dependencies required only for
examples, reducing the number of dependencies that core code needs to
rely on.
2019-08-13 16:02:21 -07:00
Joshua MacDonald
b26d6675ed Restore the experimental/streaming SDK implementation (#55)
* Fix streaming - part 1

* Eliminate span{} state

* Eliminate trace/ dir

* Avoid missing AddEvent helpers
2019-07-17 13:59:53 -07:00
rghetia
eed647d11f
replace import with vanity url go.opentelemetry.io. (#54) 2019-07-15 14:49:21 -07:00
Joshua MacDonald
961121698b Eliminate Scope/ScopeID, separate API from SDK for metrics/stats (#48)
* 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
2019-07-11 15:28:38 -07:00
rghetia
20b2f718b8
Add Circle ci (#41)
* 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.
2019-07-02 16:21:24 -07:00
rghetia
521a6c40f1
move span, trace and event implementation to sdk. (#27)
* move event to sdk.

* move trace and span implementation to sdk.
- also added noop implementation of span and trace.

* fix review comments.
2019-06-26 22:03:09 -07:00
Isobel Redelmeier
541621cff0 Move basic example into its own subdirectory (#25)
This makes it more obvious (without having to look at the code) that
the basic example is actually an example, rather than something tied to
the other examples or some sort of metadata file.
2019-06-25 23:09:11 -07:00
rghetia
d6d9786732
rename Log and Logf interface to AddEvent and AddEventf. (#22)
* rename Log and Logf interface to AddEvent and AddEventf.
- also remove log package.

* provide only AddEvent interface to Span
- Event can be created using Event specific interface.

* add var trick for Event interface.
2019-06-25 13:50:46 -07:00
rghetia
abccacef85
Revert "Remove log interface from Span." (#21)
This reverts commit a551f0298c.
2019-06-24 10:35:16 -07:00
rghetia
73b844930c
Remove log interface from Span. (#18) 2019-06-21 15:29:29 -07:00
rghetia
3c3532fb04
Add SetStatus, SpanContext and IsRecordingEvent (#12)
* Add span apis.
- SetStatus
- SpanContext
- IsRecordingEvent

* fix formatting.

* use grpc/codes.Code

* change Option to SpanOption

* fix format errors.
2019-06-19 10:44:46 -07:00
rghetia
b4a8d21a36
add license text. (#10) 2019-06-14 13:09:41 -07:00
Joshua MacDonald
e17f4468a6 Golang opentelemetry-go draft API (incomplete) (#9)
* Work in progress from https://github.com/lightstep/opentelemetry-golang-prototype

* Renames

* Rename

* Finish rename

* Rename packages

* README
2019-06-14 11:37:05 -07:00