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

978 Commits

Author SHA1 Message Date
dependabot[bot]
da3f60ac96
Bump github.com/golangci/golangci-lint in /internal/tools (#1274)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.31.0 to 1.32.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.31.0...v1.32.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-26 09:25:25 -07:00
Hui Kang
d75ccbb378
Add a Shutdown method to sdk TraceProvider (#1227)
* Add a Shutdown method to api TraceProvider

- sdktraceprovider shutdown span processors
- In examples, replace processosr shutdown with
  traceprovider's shutdown

Signed-off-by: Hui Kang <kangh@us.ibm.com>

* remove shutdown in the api provider interface

* Add context in parameter and return error

* handle error in shutdown

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-26 09:20:49 -07:00
Sam Xie
230bdd10f0
Add SpanContextFromContext() (#1255)
* SpanFromContext returns nil if span not exists

* Add tests for SpanContextFromContext

* Update CHANGELOG

* Update trace.go

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

* SpanFromContext() continue to return a noopSpan{}

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-21 17:30:28 -04:00
alrex
c9bc90b3e4
Renaming otcorrelations header to baggage (#1267)
* Renaming otcorrelations header to baggage

* Update CHANGELOG.md

* cleanup comment
2020-10-20 10:51:17 -07:00
Tyler Yahn
d6dd84f6fa
Move the otel/api/global package to otel/global (#1262)
* Move otel/api/global to otel/global

* Update global package references

* Add changes to CHANGELOG
2020-10-17 10:03:48 -07:00
Tyler Yahn
818c7b14b3
Move metric api package into otel (#1252)
* Update metric Kind to InstrumentKind

* Update all the other modules with Kind rename

* Update metric Descriptor with instrument Kind rename

* Update other modules with Descriptor method rename

* Update OTLP exporter test field name

* Rename kind filenames

* Add changes to CHANGELOG

* Fix documentation for Grouping and PrecomputedSum

* Rename meter.go to metric.go

* Move descriptor.go into metric.go

* Move must.go into metric.go

* Move instruments into metric_instrument.go

* Rename metric api_test.go to metric_test.go

* Move instrumentkind_test.go into metric_test.go

* Rename sdkapi.go metric_sdkapi.go

* Move api/metric into otel

* Update to use moved packages

* Rename otel.go to error_handler.go

* Add changes to CHANGELOG

* Fix merge conflict resolution error
2020-10-17 09:48:21 -07:00
Tyler Yahn
90de306c25
Add global propagator testing and other fixes (#1260)
* Add global propagator testing and other fixes

Use the testing framework from #1259 to test the added global
implementation of the TextMapPropagator.

Add tests for the internal state of the global package. Ensure the
behavior of setting the global for an already set value panics.

Fix oteltest `SetN` method check on the TextMapCarrier.

* Fix lint
2020-10-16 17:50:57 -07:00
Tyler Yahn
b7197d568f
Update the internal global TextMapPropagator (#1261)
* Update the internal global TextMapPropagator

Include feedback from a post-merge review of #1258

* Apply feedback

* Update api/global/internal/propagator.go

Co-authored-by: Steven E. Harris <seh@panix.com>

Co-authored-by: Steven E. Harris <seh@panix.com>
2020-10-16 17:46:47 -07:00
Tyler Yahn
ec300b28ad
Update Span API event methods (#1254)
* Update Span API event methods

Remove the context argument from the event methods. It is unused and can
be added back in as a passed option if needed in the future.

Update AddEvent to accept a required name and a set of options. These
options are the new EventOption type that can be used to configure a
SpanConfig Timestamp and Attributes.

Remove the AddEventWithTimestamp method as it is redundant to calling
AddEvent with a WithTimestamp option.

Update RecordError to also accept the EventOptions.

* Add changes to CHANGELOG

* Add LifeCycleOption

Use the LifeCycleOption to encapsulate the options passed to a span for
life cycle events.
2020-10-16 08:09:27 -07:00
Tyler Yahn
786a78ea36
Add delegating global propagator (#1258)
* Add delegating global propagator

* Add Changes to CHANGELOG

* Add PR number to CHANGELOG

* Add tests using new test framework

* Revert "Add tests using new test framework"

This reverts commit af7ae17436.
2020-10-15 10:35:47 -07:00
Tyler Yahn
8fd4b26655
Add oteltest TextMap propagator and carrier (#1259)
* Add oteltest text map propagator and carrier

* Add changes to CHANGELOG

* Add PR number to CHANGELOG

* Add test for empty newState

Gotta farm that codecov
2020-10-15 09:15:52 -07:00
Tyler Yahn
8ed55f5980
Update README with Org GA project board (#1253) 2020-10-13 15:02:38 -07:00
Tyler Yahn
4ea0a20885
Update semconv comments (#1249)
Add comments to fix lint issues with the semconv package and add
clarifying documentation for attributes.
2020-10-13 12:35:10 -07:00
Tyler Yahn
5c21e88fde
Update documentation for otel/oteltest (#1248)
* Fix lint issues in `otel/oteltest`

Add documentation to exported functions, types, and methods that had
none.

Update existing documentation to wrap consistently and fix grammatical
errors.

* Update oteltest package documentation
2020-10-13 12:27:53 -07:00
Tyler Yahn
396dd6053c
Rename Kind from the api/metric package (#1240)
* Update metric Kind to InstrumentKind

* Update all the other modules with Kind rename

* Update metric Descriptor with instrument Kind rename

* Update other modules with Descriptor method rename

* Update OTLP exporter test field name

* Rename kind filenames

* Add changes to CHANGELOG

* Fix documentation for Grouping and PrecomputedSum
2020-10-13 07:55:31 -07:00
Tyler Yahn
65044a118b
Move api/apitest into the otel/oteltest package (#1241)
* Move the apitest package into oteltest

* Add documentation to exported func and type

* Add changes to CHANGELOG

* Update move in other modules
2020-10-12 08:47:41 -07:00
Tyler Yahn
a46f88ee8d
Fix lint issues in otel package (#1243)
* Fix lint issues in otel package

Add documentation for the shadowed `Meter` for the time being.

Do not export `ErrInvalidHexID`, `ErrInvalidTraceIDLength`,
`ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID`.
These are not used externally and we should reduce the API prior to a GA
release to allow flexibility going forward.

Add and update comments for all SpanKind conforming to golint spec.

* Update CHANGELOG
2020-10-12 08:43:26 -07:00
Tyler Yahn
bafde86b29
Fix lint issues in the label package (#1244)
Rename MergeItererator to MergeIterator to correct the spelling mistake.

Add comment for exported `EmptySet`.

Fix comments on the exported label `Type`s to conform to Go standards.
2020-10-12 08:39:12 -07:00
Tyler Yahn
7ecc55581b
Update documentation for the OTLP exporter (#1242)
* Update documentation for the OTLP exporter

Update package documentation to reflect the contents of the package.

Fix lint issues by adding documentation for all exported types.

Update file comment location in otlp.go so golint does not interpret it
as package documentation.

* Apply suggestions from code review

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-10-11 19:57:50 -07:00
Joshua MacDonald
f60f51d0a2
Move asyncronous metrics state helper out of apimetric/metrictes (#1234) 2020-10-11 14:46:29 -04:00
Paul Osman
02cd123542
Call sampler on local child spans. (#1233)
* Call sampler on local child spans.

* Update CHANGELOG.md

* Adding a test for calling the sampler on local child spans

* Add clarifying comment to test
2020-10-09 18:48:34 -04:00
alrex
25ccf5a08a
Update proto v0.5.0 (#1230)
* Updating version of OTLP to 0.5.0

* updating trace transform to use latest protos

* update otlp span test

* forgot one test

* finishing the rest of the implementation

In this change:
- MetricDescriptor is no longer a member of the metric
- splitting Sum, Gauge, Histogram by Int/Float
- SummaryDataPoints are no longer around, MinMaxSumCount is now a Histogram

* update changelog

* Update CHANGELOG.md

Move changes to the Unreleased section. This is to account for the recent release.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-08 20:07:39 -07:00
Tyler Yahn
27c84d689d
Move trace api package into otel (#1229)
* Move trace API to otel

* Move tracetest to oteltest

* Update package documentation

* Remove old api/trace package

* Lint

* Add changes to CHANGELOG

* Add tests for rest of trace API

* Apply suggestions from code review

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Documentation fixes

Includes resolutions for review issues.

* Correct CHANGELOG post release

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-10-08 19:58:56 -07:00
Anthony Mirabella
9ebca887f0
Pre release v0.13.0 (#1231)
* Prepare for releasing v0.13.0

* Update CHANGELOG.md for v0.13.0 release
2020-10-08 18:18:50 -04:00
Tyler Yahn
5660b0b59f
Update label.ArrayValue to store copies of 1D arrays (#1226)
* Update label.ArrayValue to store copies of 1D arrays

* Update OTLP transform of array attributes

* Add changes to CHANGELOG

* Add PR number to changes

* Update value function documentation

* Remove redundant checks

* Add Array test for invalid array types

* Add test to ensure return from AsArray is a type

* Clean up iteration
2020-10-05 17:09:03 -07:00
Tyler Yahn
577b21745b
Update codes to match specification (#1214)
* Update codes to match specification

* Add changes to changelog

* go mod tidy

* Add unit tests for codes

* Update SetStatus methods to only filter Unset

* Update apitest code being tested
2020-10-05 11:36:03 -07:00
dependabot[bot]
e9c80e62a4
Bump github.com/openzipkin/zipkin-go from 0.2.4 to 0.2.5 in /exporters/trace/zipkin (#1224)
* 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.4 to 0.2.5.
- [Release notes](https://github.com/openzipkin/zipkin-go/releases)
- [Commits](https://github.com/openzipkin/zipkin-go/compare/v0.2.4...v0.2.5)

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-10-05 09:17:02 -07:00
dependabot[bot]
b0fd424c20
Bump github.com/itchyny/gojq from 0.11.1 to 0.11.2 in /internal/tools (#1225)
* Bump github.com/itchyny/gojq from 0.11.1 to 0.11.2 in /internal/tools

Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/master/CHANGELOG.md)
- [Commits](https://github.com/itchyny/gojq/compare/v0.11.1...v0.11.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-10-05 09:12:24 -07:00
Tyler Yahn
5e66340594
Add Baggage API and move Baggage propagator (#1217)
* Move api/baggage to the propagators package

* Create Baggage API to match specification

* Update CHANGELOG.md

* Baggage API unit tests

* Rename and add unit test

* Update unit test value checking

* Update TODO with issue tracking work.
2020-10-05 11:25:09 -04:00
Stanley Nguyen
de50711fcc
feat(span): remove SetAttribute method (#1216)
* feat(span): remove SetAttribute method

* Update CHANGELOG.md

Revert markdown lint changes and unify the `Removed` section.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-02 14:41:15 -07:00
Tyler Yahn
6e184cd16f
Update propagation to conform with OpenTelemetry specification (#1212)
* Move propagation package contents to the otel package

* Implement package relocation

* Update propagation to OTel spec

* Add changes to changelog

* Add propagation tests
2020-10-02 12:27:16 -07:00
huikang
dc79f7fe25
Remove duplicate hostname in Resource (#1219)
* Remove duplicate hostname in Resource

- Refer to opentelemetry-specification

Signed-off-by: Hui Kang <kangh@us.ibm.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-01 08:28:27 -07:00
huikang
423c891359
Set default propagator to no-op propagator (#1204)
- add set propagator to examples

Signed-off-by: Hui Kang <kangh@us.ibm.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-09-29 16:50:58 -07:00
ET
04297f4d04
Enable exporting Histogram aggregation to OTLP metric (#1209)
* Add Count() to Histogram interface

* Fix copy/pasted comment for Count() interface

* Implement Histogram conversion to OTLP protobuf

* Add CHANGELOG message

* Filled in PR # for Changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-28 17:58:15 -07:00
huikang
a69f8fbe7a
Add integration tests for span processor ordering (#1208)
- Test by span attributes added by processors in the order
  they were registered.

Signed-off-by: Hui Kang <kangh@us.ibm.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-28 09:29:14 -07:00
Joshua MacDonald
3a9f5fe15f
Test benchmarks in precommit (#1207)
* Fix the metric SDK benchmarks

* Test the benchmarks in precommit
2020-09-25 13:27:03 -07:00
Anthony Mirabella
0b348c345f
Prepare v0.12.0 release (#1205)
* Prepare for releasing v0.12.0

* Update CHANGELOG.md for v0.12.0 release

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-24 19:01:48 -04:00
Joshua MacDonald
8c3cc43992
Use LastValue by default for ValueObserver instruments (#1165)
* Use LastValue by default for ValueObserver instruments

* Update test

* Update test with feedback

* Update fix

* Update changelog

* sum->scalar

* Tests pass

* Add a test

* Undo incorrect proto adds

* Restore origin protos

* Restore

* Upstream

* Add more tests

* Precommit

* Typo

* ore test feedback
2020-09-24 18:30:55 -04:00
David Ashpole
304d4cdffc
ensure batch span processors are shutdown in examples (#1199) 2020-09-24 18:25:20 -04:00
Tyler Yahn
1e72b51b31
Add example test for a custom SpanProcessor (#1196)
* Add example test for a custom SpanProcessor

* Use existing test framework exporter

* Update example

* Add fixes from upstream
2020-09-24 18:20:18 -04:00
huikang
b97533a74b
Register/unregister in the fixed order (#1198)
- change the processors' map to array
- increase test coverage

Signed-off-by: Hui Kang <kangh@us.ibm.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-24 11:43:23 -07:00
Dan Rusei
559fecd73e
Update the attribute names for the OTel attributes for the zipkin exporter (#1201)
Based on the spec change: https://github.com/open-telemetry/opentelemetry-specification/pull/967
2020-09-23 22:42:05 -04:00
Tyler Yahn
7d71867644
Rename *Provider names (#1190)
* Rename *Provider names

There is overlap in naming with MeterProviders and TracerProviders. This
is means the specification is not implemented and these types can not
exist in the same package (#1179). This makes each type and related
functions and types explicit.

* Add changes to CHANGELOG
2020-09-23 18:16:13 -04:00
Cole Packingham
5dd2962202
Remove semantic convention for http status text (#1194)
* Remove http status text

* Updated changelog

* More descriptive changelog

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-23 14:52:44 -04:00
ET
038f505d12
Remove B3 propagator from otel repo (#1191)
* Remove B3 propagator

* Add to Changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-22 11:02:31 -07:00
ET
e7e1dce982
Update sampling decision names (#1192)
* Rename SamplingDecision enum values

As prescribed in
https://github.com/open-telemetry/opentelemetry-specification/pull/938
and https://github.com/open-telemetry/opentelemetry-specification/pull/956.

* Include in Changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-22 10:34:43 -07:00
Anthony Mirabella
b9357d7ee2
Remove flaky BatchSpanProcessor.ForceFlush() test (#1189)
It is unreliable with no clear good way to make it reliable.  The
ForceFlush() method is a simple passthrough to bsp.exportSpans() and the
existing tests of that method should suffice.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-21 13:30:49 -07:00
dependabot[bot]
fa741472e7
Bump google.golang.org/api from 0.31.0 to 0.32.0 in /exporters/trace/jaeger (#1188)
* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.31.0 to 0.32.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.31.0...v0.32.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: Anthony Mirabella <a9@aneurysm9.com>
2020-09-21 12:06:05 -04:00
Tyler Yahn
4b46365d1d
Move api/unit to top level (#1185)
* Move api/unit to top level

* Add changes to CHANGELOG
2020-09-20 13:54:21 -04:00
huikang
930b4d01f6
Fix missing shutdown of the batch processor (#1186)
Signed-off-by: Hui Kang <kangh@us.ibm.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2020-09-20 13:40:47 -04:00