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

1527 Commits

Author SHA1 Message Date
Tyler Yahn
5d559b4007
Remove makeSamplingDecision func (#1711)
The makeSamplingDecision function is a wrapper around the provider
sampler calling ShouldSample with a duplicate configuration struct. That
duplication and need for translation as well as the addition function
call is unnecessary, this function is called in only one place.

Resolves #1706
2021-03-20 09:19:03 -07:00
Tyler Yahn
e24702daad
Update the TraceContext.Extract docs (#1720)
How the tracecontext is extracted is important if the user wants to
interact with the extracted SpanContext (i.e. as a remote span context
instead of a current span context). This makes it clear where it will be
extracted and what behavior to expect if the tracecontext is invalid.
2021-03-20 09:12:34 -07:00
Anthony Mirabella
9d4eb1f6d3
Update dates in CHANGELOG.md for 2021 releases (#1723) 2021-03-19 20:34:06 -04:00
Tyler Yahn
2b4fa9681b
Release v0.19.0 (#1710)
Update project version to v0.19.0
2021-03-19 08:36:17 -07:00
Injun Song
4beb70416e
sdk/trace: removing ApplyConfig and Config (#1693)
This patch removes `ApplyConfig` method and `Config` struct from
`go.opentelemetry.io/otel/sdk/trace` package.  To ensure valid config
for TracerProvider, it adds `ensureValidTracerProviderConfig` private
function.
Jaeger and Zipkin have been used the `Config` directly across package
boundaries. Since `Config` is removed, they can't use it. This change,
thus, replaces `WithSDK` with `WithSDKOptions`.

Resolves #1636, #1705.
2021-03-18 10:48:13 -07:00
Tyler Yahn
1d42be1601
Rename WithDefaultSampler TracerProvider option to WithSampler and update docs (#1702)
* Rename WithDefaultSampler TracerProvider option to WithSampler

The term "DefaultSampler" comes from early ideas of this project where
there would be overriding samplers lower in the trace SDK. This
overriding does not exist and if it is going to be introduced in the
future the sampler associated with the TracerProvider is already scoped
based on that association (no need to scope with a name). This renames
the TracerProvider option to not include this anachronism.

* Update PR number in CHANGELOG

* Propagate rename

* Update defaults documentation for TracerProvider

* Update sdk/trace/provider.go

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

* Update sdk/trace/provider.go

Co-authored-by: Steven E. Harris <seh@panix.com>
2021-03-18 09:34:47 -07:00
Anthony Mirabella
860d5d86e7
Add flag to determine whether SpanContext is remote (#1701)
* Add remote property to SpanContext

* Set SpanContext.remote when extracting context in TraceContext propagator

* Ensure remote flag is set when inserting remote SpanContext into context

* Ensure tests are expecting remote flag in SpanContext where appropriate

* Update CHANGELOG.md

* Apply PR feedback

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-18 09:05:37 -07:00
Tyler Yahn
0fe65e6bd2
Comply with OpenTelemetry attributes specification (#1703)
* Add Valid method to KeyValue

* Use KeyValue.Valid in attribute add on Span

* Resource StringDetector errors for invalid attribute

* Ignore invalid attr in NewWithAttributes

The OpenTelemetry specification requires attributes conform to a
standard evaluated and returned by attribute.KeyValue.Valid. To comply
with the specification, Resources created from NewWithAttributes need to
only contain valid attributes. This adds a check to ensure this and
drops invalid attributes passed as arguments.

* Add changes to changelog

* Add nolint comment

The attribute.Set is (possibly overly) optimized to avoid allocations.
The returned value from the constructor is a value of a Set, not a
pointer to the Set. A Set contains a lock value and pointer methods so
passing the Set value raises the copylock go vet error. This copies the
same nolint comment from the `NewSet` method this used to use.

* Apply suggestions from code review

Co-authored-by: Sam Xie <xsambundy@gmail.com>

Co-authored-by: Sam Xie <xsambundy@gmail.com>
2021-03-17 20:48:43 -04:00
dependabot[bot]
888843519d
Bump google.golang.org/api from 0.40.0 to 0.41.0 in /exporters/trace/jaeger (#1700)
* Bump google.golang.org/api in /exporters/trace/jaeger

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.40.0 to 0.41.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.40.0...v0.41.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: Aneurysm9 <Aneurysm9@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-17 09:32:45 -07:00
José Carlos Chávez
345f264a13
breaking(zipkin): removes servicName from zipkin exporter. (#1697)
* breaking(zipkin): removes servicName from zipkin exporter.

Resource detector provides a serviceName in all cases, hence we can relay on span resource to obtain the serviceName. Also this is required by the spec https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk_exporters/zipkin.md\#service-name (#1549).

* docs(zipkin): adds changelog.

* chore(examples/zipkin): updates example accordingly.

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-03-16 13:38:48 -04:00
Sam Xie
62cbf0f240
Populate Jaeger's Span.Process from Resource (#1673)
* Jaeger exporter now populate Jaeger's Span Process from Resource

* Remove jaeger.WithProcess

* Fix tests

* Change the type of default service name into string

* Add tests

* Update CHANGELOG

* Use the API from `Set` to fetch service name in exporter

* Fix nits

* Add more test cases for jaegerBatchList function

* precommit

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-03-16 12:04:46 -04:00
Sam Xie
28eaaa9a91
Add a test to prove the Tracer is safe for concurrent calls (#1665)
* Add test to prove the Tracer is safe for concurrent calls

* Fix NotToPanic of harness never call the input func

* Fix tests

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-03-16 11:55:14 -04:00
Tyler Yahn
8b1be11a54
Rename resource pkg label vars and methods (#1692)
* Rename resource pkg label vars and methods

The former `labels` package is now named `attributes` to conform with
the specification requirement. This removes the lingering `label` term
from the `resource` package.

Resolve https://github.com/open-telemetry/opentelemetry-go/issues/1691

* Update PR number in CHANGELOG

* Propagate rename to the prometheus exporter pkg
2021-03-11 11:00:12 -08:00
David Ashpole
a1539d4485
OpenCensus metric exporter bridge (#1444)
* add OpenCensus metric exporter bridge

* Update bridge/opencensus/README.md

Co-authored-by: Eric Sirianni <sirianni@users.noreply.github.com>

Co-authored-by: Eric Sirianni <sirianni@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-11 09:49:20 -08:00
Bogdan Drutu
77aa218d4d
Fix issue #1490, apply same logic as in the SDK (#1687)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2021-03-10 11:04:05 -08:00
Bogdan Drutu
9d3416cc91
Fix synchronization issues in global trace delegate implementation (#1686)
* Fix synchronization issues in global trace delegate implementation

Running tests with `-race` and before the fix
```
➜  opentelemetry-go git:(fixconcurrency) go test -race go.opentelemetry.io/otel/internal/global
==================
WARNING: DATA RACE
Write at 0x00c00010ffc8 by goroutine 28:
  go.opentelemetry.io/otel/internal/global.(*tracer).setDelegate.func1()
      /Users/lazy/github/opentelemetry-go/internal/global/trace.go:118 +0xf4
  sync.(*Once).doSlow()
      /usr/local/opt/go/libexec/src/sync/once.go:68 +0x109
  sync.(*Once).Do()
      /usr/local/opt/go/libexec/src/sync/once.go:59 +0x68
  go.opentelemetry.io/otel/internal/global.(*tracer).setDelegate()
      /Users/lazy/github/opentelemetry-go/internal/global/trace.go:118 +0x76
  go.opentelemetry.io/otel/internal/global.(*tracerProvider).setDelegate()
      /Users/lazy/github/opentelemetry-go/internal/global/trace.go:75 +0x16f
  go.opentelemetry.io/otel/internal/global.SetTracerProvider.func1()
      /Users/lazy/github/opentelemetry-go/internal/global/state.go:65 +0xd0
  sync.(*Once).doSlow()
      /usr/local/opt/go/libexec/src/sync/once.go:68 +0x109
  sync.(*Once).Do()
      /usr/local/opt/go/libexec/src/sync/once.go:59 +0x68
  go.opentelemetry.io/otel/internal/global.SetTracerProvider()
      /Users/lazy/github/opentelemetry-go/internal/global/state.go:57 +0x79
  go.opentelemetry.io/otel.SetTracerProvider()
      /Users/lazy/github/opentelemetry-go/trace.go:43 +0x388
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:177 +0x373
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202

Previous read at 0x00c00010ffc8 by goroutine 29:
  go.opentelemetry.io/otel/internal/global.(*tracer).Start()
      /Users/lazy/github/opentelemetry-go/internal/global/trace.go:124 +0x64
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines.func1()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:165 +0xf1

Goroutine 28 (running) created at:
  testing.(*T).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1239 +0x5d7
  testing.runTests.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:1512 +0xa6
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202
  testing.runTests()
      /usr/local/opt/go/libexec/src/testing/testing.go:1510 +0x612
  testing.(*M).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1418 +0x3b3
  go.opentelemetry.io/otel/internal/global_test.TestMain()
      /Users/lazy/github/opentelemetry-go/internal/global/internal_test.go:39 +0x4dc
  main.main()
      _testmain.go:85 +0x271

Goroutine 29 (running) created at:
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:160 +0x259
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202
==================
==================
WARNING: DATA RACE
Write at 0x00c00037a000 by goroutine 29:
  sync/atomic.StoreInt32()
      /usr/local/opt/go/libexec/src/runtime/race_amd64.s:242 +0xb
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines.func2.1()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:183 +0x6d
  go.opentelemetry.io/otel/internal/global_test.fnTracer.Start()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:81 +0x98
  go.opentelemetry.io/otel/internal/global.(*tracer).Start()
      /Users/lazy/github/opentelemetry-go/internal/global/trace.go:125 +0xfd
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines.func1()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:165 +0xf1

Previous write at 0x00c00037a000 by goroutine 28:
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:176 +0x2c4
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202

Goroutine 29 (running) created at:
  go.opentelemetry.io/otel/internal/global_test.TestTracerDelegates_MultiGoRoutines()
      /Users/lazy/github/opentelemetry-go/internal/global/trace_test.go:160 +0x259
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202

Goroutine 28 (running) created at:
  testing.(*T).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1239 +0x5d7
  testing.runTests.func1()
      /usr/local/opt/go/libexec/src/testing/testing.go:1512 +0xa6
  testing.tRunner()
      /usr/local/opt/go/libexec/src/testing/testing.go:1194 +0x202
  testing.runTests()
      /usr/local/opt/go/libexec/src/testing/testing.go:1510 +0x612
  testing.(*M).Run()
      /usr/local/opt/go/libexec/src/testing/testing.go:1418 +0x3b3
  go.opentelemetry.io/otel/internal/global_test.TestMain()
      /Users/lazy/github/opentelemetry-go/internal/global/internal_test.go:39 +0x4dc
  main.main()
      _testmain.go:85 +0x271
==================
--- FAIL: TestTracerDelegates_MultiGoRoutines (0.20s)
    testing.go:1093: race detected during execution of test
FAIL
FAIL    go.opentelemetry.io/otel/internal/global        0.920s
FAIL
```

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update internal/global/trace_test.go

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

* Update internal/global/trace_test.go

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

* Make tests not flaky

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-10 08:45:31 -08:00
Matej Gera
58f69f091e
Span status from HTTP code: Do not set status message if it can be inferred (#1681)
* Do not set status message if reason can be inferred

* Update CHANGELOG

* Add comment on validation func

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-10 08:28:09 -08:00
Tyler Yahn
9c305bde9c
Flush metric events prior to shutdown in OTLP example (#1678)
* Flush metric events prior to shutdown in OTLP example

* Add changes to changelog
2021-03-10 08:19:59 -08:00
Sam Xie
66b1135af4
Fix CHANGELOG (#1680)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-09 13:02:42 -08:00
Anthony Mirabella
90bd4ab50c
Update employer information for maintainers (#1683)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-09 10:55:46 -08:00
ET
3684191338
Remove WithRecord() option from trace.SpanOption when starting a span (#1660)
* Remove `WithRecord()` option from SpanConfig options

This brings the trace API into conformance with the specification.

* Add entry to CHANGELOG

Fixes #192

* Updated CHANGELOG with PR#

* Cleaned up CHANGELOG notes

* fixup! Merge remote-tracking branch 'upstream/main' into remove-with-record

* Use new spanContext API to set traceflags, tracestate

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-09 09:45:09 -08:00
Tyler Yahn
65c7de2069
Remove trace prefix from NoOp src files. (#1679) 2021-03-09 09:12:06 -08:00
Anthony Mirabella
e88a091a72
Make SpanContext Immutable (#1573)
* Make SpanContext Immutable

* Adds NewSpanContext() constructor and SpanContextConfig{} struct for
constructing a new SpanContext when all fields are known
* Adds With<field>() methods to SpanContext for deriving a SpanContext
with a single field changed.
* Updates all uses of SpanContext to use the new API

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Add tests for new SpanContext constructor and derivation

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Address PR feedback

* Fix new uses of SpanContext from main
2021-03-09 08:17:29 -08:00
Injun Song
d75e268053
Avoid overriding configuration of tracer provider (#1633)
* sdk/trace: add missing options to tracer provider

This change adds `WithDefaultSampler` and `WithSpanLimits` to the tracer
provider and removed `WithConfig` from it.

Before this change, `WithConfig` is the only way to set sampler or
limits of a span. However, it is prone to misuse, since `WithConfig` can
override tracing configurations that are configured by `WithResource` or
`WithIDGenerator`.  Thus to fix this, it adds new functional options -
`WithDefaultSampler` and `WithSpanLimits` and removes `WithConfig`.

Resolves #1631.

* Update sdk/trace/provider.go

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

* Update sdk/trace/provider.go

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

* rebase and remove WithConfig

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 13:43:11 -08:00
dependabot[bot]
2b4d5ac329
Bump github.com/golangci/golangci-lint in /internal/tools (#1671)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.37.1 to 1.38.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.37.1...v1.38.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>
2021-03-08 12:26:54 -08:00
dependabot[bot]
150b868d02
Bump github.com/google/go-cmp from 0.5.4 to 0.5.5 (#1667)
* Bump github.com/google/go-cmp from 0.5.4 to 0.5.5

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.4...v0.5.5)

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>
2021-03-08 12:15:49 -08:00
Tyler Yahn
76aa924e75
Fix the examples target info messaging (#1676)
The echo for the target was copied from other targets that use `dir` as
an iteration variable which is not what this target uses. That means
that the empty variable `dir` is unexpanded and the unhelpful message of
"build /..." is echoed. This updates the iteration variable to match
other targets and fixes the info messaging.
2021-03-08 11:59:41 -08:00
dependabot[bot]
a3aa9fdab0
Bump github.com/itchyny/gojq from 0.12.1 to 0.12.2 in /internal/tools (#1672)
* Bump github.com/itchyny/gojq from 0.12.1 to 0.12.2 in /internal/tools

Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.12.1 to 0.12.2.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/itchyny/gojq/compare/v0.12.1...v0.12.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>
2021-03-08 11:43:04 -08:00
Veera Pirla
a5edd79e31
Removed setting error status while recording err as span event (#1663)
* Fix #1661 Removed setting error status while recording err as span event

* Update CHANGELOG.md

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

* Update RecordError method doc

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

* Fix grammatical errors in Changelog

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

* Update RecordError method doc

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 11:31:01 -08:00
José Carlos Chávez
e981475827
chore(zipkin): improves zipkin example to not to depend on timeouts. (#1566)
* chore(zipkin): improves zipkin example to not to depend on timeouts.

* chore: improves variable name

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

* chore(zipkin): makes lint happy.

* fix(zipkin): fixes example

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

* fix(zipkin): import.

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 11:23:15 -08:00
Tyler Yahn
3dc91f2d76
Add ForceFlush method to TracerProvider (#1608)
* Add ForceFlush method to TracerProvider

The specification requires that a TracerProvider have a ForceFlush
method that can be set with a timeout, return any error to the caller,
and have all the registered span processors export their spans. This
updates the SpanProcessor.ForceFlush method to accept a context and
return an error and plumbs this method into a new ForceFlush method of
the SDK TracerProvider.

Additionally, this corrects the TracerProvider Shutdown method. This
method as well needs to return to the caller any failure it encounters
according to the specification. This returns an error if it cannot type
assert the spanProcessorStates or if shutting down a span processor
results in an error.

Resolves #1606

* Add changes to changelog

* Apply suggestions from code review

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

* Cancel export context when BSP stops

* Defer cancel call in BSP span processor funcs

Co-authored-by: Steven E. Harris <seh@panix.com>
2021-03-08 11:12:13 -08:00
Louis DeLosSantos
bd0bba43b5
exporter: swap pusher for exporter (#1656)
to provide consistent naming across the code base, deprecate pusher in
favor of exporter naming convention.

Signed-off-by: ldelossa <ldelossa@redhat.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 10:00:56 -08:00
Tyler Yahn
569048591c
Update the SimpleSpanProcessor (#1612)
* Update the SimpleSpanProcessor

Subsequent calls to OnStart, OnEnd, and ForceFlush should be ignored
gracefully once Shutdown has been called. This implements that behavior
by shutting down the exporter and removing it from the
SimpleSpanProcessor so subsequent calls to OnEnd will be no-ops.

* Add changes to changelog

* Lock in sync.Once of shutdown instead of Shutdown scope

* Update CHANGELOG.md

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

* Release exporterMu before shutdown exporter

* Move changes to unreleased section of changelog

* Update simple_span_processor.go

revert comment change from merge

Co-authored-by: Steven E. Harris <seh@panix.com>
2021-03-08 09:50:15 -08:00
Veera Pirla
a7f7abac65
SpanStatus description set only when status code is set to Error (#1662)
* Fix #1658 SpanStatus description set only when status code is set to error

* Update CHANGELOG.md

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 09:40:38 -08:00
Matej Gera
05252f40d8
Jaeger Exporter: Fix minor mapping discrepancies (#1626)
* Set span status code, message and ref types according to the spec

* Serialize array attributes as string

* Use correct lib name / version key

* Add new and adjust existing tests

* Update CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 09:32:02 -08:00
Veera Pirla
238e7c61ba
Add non-empty string check for attribute keys (#1659)
* Fixes #1657 Add non-empty string check for attribute keys

* Update PR number in changelog

* Update CHANGELOG.md

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

* Update sdk/trace/span.go

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 09:24:29 -08:00
ET
e9b9aca8a6
Add tests for propagation of Sampler Tracestate changes (#1655)
* Add tests for propagation of Sampler Tracestate changes

Sampler specification indicates that SamplingResult.Tracestate
should be associated with the SpanContext of the newly created span.
See
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#sampler

* Fix SamplingResult TraceState propagation

* Add Changelog entry

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-08 08:05:25 -08:00
Tyler Yahn
875a25835f
Add docs on when reviews should be cleared (#1556) 2021-03-05 14:25:58 -08:00
Aaron Clawson
7153ef2dc2
Add HTTP/JSON to the otlp exporter (#1586)
* Add HTTP/JSON to the otlp exporter

Co-Authored-By: Roy van de Water <72016+royvandewater@users.noreply.github.com>

* PR fixup

Co-authored-by: Roy van de Water <72016+royvandewater@users.noreply.github.com>
2021-03-05 09:59:09 -08:00
Tyler Yahn
62e2a0f766
Unexport the simple and batch SpanProcessors (#1638)
* Unexport the simple and batch SpanProcessors

* Update changes in changelog
2021-03-05 08:08:29 -08:00
Tyler Yahn
992837f195
Add TracerProvider tests to oteltest harness (#1607)
* Add TracerProvider tests to oteltest harness

* Update Tracer method docs

* Fix grammar
2021-03-03 12:09:58 -08:00
Anthony Mirabella
bb4c297eb3
Pre release v0.18.0 (#1635)
* Prepare for releasing v0.18.0

* Update CHANGELOG for v0.18.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>
2021-03-03 14:40:00 -05:00
Tyler Yahn
712c3dccf8
Fix makefile ci target and coverage test packages (#1634) 2021-03-03 13:24:57 -05:00
Tyler Yahn
841d2a5885
Rename local var new to not collide with builtin (#1610)
* Rename local var new to not collide with builtin

* Add missed var rename
2021-03-03 08:26:26 -08:00
Tyler Yahn
13938ab5a8
Update SpanProcessor docs (#1611)
Included all directives from the specification, clarify english, and
translate specifics for the Go language.
2021-03-02 07:20:13 -08:00
Tyler Yahn
e25503a00e
Add compatibility tests to CI (#1567)
* Add compatibility tests to CI

* Increase timeout to 60s

Some of the aggregator tests are running just over 30 seconds when
testing on Windows. Bump this to allow for it.

* Remove cache setup jobs

Having a unified job setup the cache when none exists so packages are
only downloaded once is ideal, but these steps are taking too long. In
some situations they are doubling the run time. Remove them and prefer
to have multiple downloads when dependencies change.

* Add changes to changelog

* Remove mod-download target from Makefile

Unused now that the cache jobs are removed.

* Add compatibility testing table to changelog

* Add change about precommit to changelog

* Update README

* Correct examples target in lint job
2021-03-01 08:38:23 -08:00
Injun Song
1519d95982
Use reasonable interval in sdktrace.WithBatchTimeout (#1621)
* Use reasonable interval in sdktrace.WithBatchTimeout

This patch resolves #1564.

* Add pull request ID to CHANGELOG.md
2021-03-01 08:03:55 -08:00
Trevor Foster
7d4496e0fe
Pass metric labels when transforming to gaugeArray (#1570)
* Pass metric labels when transforming to gaugeArray

* Update CHANGELOG.md

* Update CHANGELOG.md

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

* Add label requirements to transformed metric assertions

* Fix fmting

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-02-28 09:53:41 -08:00
dependabot[bot]
6d4a5e0df3
Bump google.golang.org/grpc from 1.35.0 to 1.36.0 in /exporters/otlp (#1619)
* Bump google.golang.org/grpc from 1.35.0 to 1.36.0 in /exporters/otlp

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.35.0...v1.36.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>
2021-02-28 09:42:59 -08:00
dependabot[bot]
a93393a0d7
Bump google.golang.org/grpc in /example/prom-collector (#1620)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.35.0 to 1.36.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.35.0...v1.36.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-28 09:34:54 -08:00