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

372 Commits

Author SHA1 Message Date
Tyler Yahn
4021872f57
Release stable-v1 as 1.1.0 (#2327)
* Version stable-v1 modset to be 1.0.2 for release

* Prepare stable-v1 for version v1.0.2

* Update changelog

Add new 1.0.2 section and move relevant items that the release will
contain to this section.

* Add article to CHANGELOG entry to correct grammar

* Release 1.1.0 instead of 1.0.2

* Prepare stable-v1 for version v1.1.0

* Apply suggestions from code review

Co-authored-by: Robert Pająk <pellared@hotmail.com>

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2021-10-27 12:18:40 -07:00
Tyler Yahn
8324034a21
Add semconv/v1.5.0 package (#2322)
Generated from a modified version of the v1.5.0 release of the
specification using a modified version of the semconvgen tools. The
specification contained capitalized IDs that caused errors from the
semconvgen tool. These errors were manually resolved and the rest of the
Go formatting tools were used to provide consistent code.

Important to note, the Go semconvgen tooling includes new name
capitalization rules for ReplicaSet, StatefulSet, and DaemonSet that
mean code names are not backwards compatible. This is included in the
changelog to help users perform the upgrade.
2021-10-25 12:05:00 -04:00
Tyler Yahn
4c59cc4967
Add semconv/v1.6.1 package (#2321)
Generated from the v1.6.1 release of the specification using the
semconvgen tool manually.

This skips the v1.6.0 release of the specification, with no plans to add
support in the future, due to a backwards in compatibility bug in
included.
2021-10-22 09:13:07 -07:00
Tyler Yahn
c4ba4811a2
Add semconv/v1.7.0 package (#2320)
* Add semconv/v1.7.0 package

Generated from the v1.7.0 release of the specification using the
semconvgen tool manually. This also updates the project to use this
version of the semconv package.

This does not include the prior, and missing, v1.5.0 and v1.6.0 versions
of the semconv package. They are planned to be added in a follow-on PR.

* Update CHANGELOG.md
2021-10-22 08:43:47 -07:00
Tyler Yahn
23a33739e9
Fix flaky test TestSimpleSpanProcessorShutdownHonorsContextCancel (#2290)
* Fix flaky test TestSimpleSpanProcessorShutdownHonorsContextCancel

* Add changes to changelog

* Prioritize return of exporter error

* Update changelog description

* Fix deadlock bug
2021-10-19 08:13:37 -07:00
ET
1f4b606be8
Fix IPv6 parsing errors in semconv.NetAttributesFromHTTPRequest (#2285)
* Fix IPv6 handling errors in semconv.NetAttributesFromHTTPRequest

fixes #2283

* Enter PR number in CHANGELOG

* Remove unnecessary creation and then assignment

Standardize order of checks for IP, Name, Port

* Assume happy path when parsing host and port

i.e. assume net.SplitHostPort(input) will succeed

* Get rid of uint64 for port

* Fix git merge of main by adding back strings import

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2021-10-18 13:13:52 -07:00
Garth Kidd
2e6211eed9
Fix: http.client_ip vs multiple addresses #2282 (#2284)
* Fix: http.client_ip vs multiple addresses #2282

* Split only the necessary number of values.

As suggested by @pellared. Good suggestion, that.

Co-authored-by: Robert Pająk <pellared@hotmail.com>

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-10-18 10:33:55 -07:00
Joshua MacDonald
6df0de12bc
Metrics: Rename sdk/export/metric.ExportKind to aggregation.Temporality (#2274)
* Rename ExportKind to aggregation.Temporality

* Changelog uhhhhhhh

* Apply suggestions from code review

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

* int->uint8

* go generate

* go.sum

* anual edit

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-10-15 11:18:36 -07:00
Tigran Najaryan
e72a235518
Add ability to parse Schema files according to OTEP 0152 (#2267)
* Add ability to parse Schema files according to OTEP 0152

The parser and parsed representation (AST) are placed in a separate
Go module so that they are can be consumed independently without
the need to bring the rest of the SDK.

Ability to use the parsed representation for schema conversions
can be added later.

* Fixes based on PR comments

* Rename "label" to "attributes"

See https://github.com/open-telemetry/oteps/pull/181

* Fixes based on PR comments

* Add README.md

* Wrap the error in Parse()

* Add docs for exporter types

* Use yaml.NewDecoder

* Verify parsed content in the test

* Fix indentation in README example

* Fix README spaces vs tabs

* Correctly space imports

* Add heading to README

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-10-15 09:44:13 -07:00
Joshua MacDonald
478dc4fe40
Metrics: Move the non-API types into sdkapi (#2271)
* move Descriptor to sdkapi, add test

* rename Descriptor to sdkapi

* precommit

* Move the rest of the sdkapi

* use alias for Observation and Measurement

* Changelog

* pr num

* comment Measurement and Observation

* swap comments

* move->moved
2021-10-14 09:06:22 -07:00
Srikanth Chekuri
8ba6da8f3e
Skip links with invalid span context (#2275)
* Skip links with invalid span context

* Add CHANGELOG entry

* Review suggestions
2021-10-12 07:45:10 -07:00
Tõnis Tiigi
c71afaf31f
allow otlp clients to use existing grpc connection (#2002)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-10-11 12:23:12 -07:00
Anthony Mirabella
737275271d
Release prep v1.0.1/v0.24.0 (#2270)
* Update build tools

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

* Update CHANGELOG and versions.yaml

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

* Prepare stable-v1 for version v1.0.1

* Prepare experimental-metrics for version v0.24.0

* Prepare bridge for version v0.24.0

* Update releasing documentation and create add-tags make target

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

* use multimod from the .tools directory

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

* precommit

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-10-01 16:20:32 -04:00
Liz Fong-Jones
66fccc0be0
fix: lock accesses to encoder in json stdout exporter to prevent crash (#2265)
* lock accesses to encoder

fixes #2264

* move locking outside loop to avoid deadlock

* Update CHANGELOG.md
2021-09-30 15:58:26 -04:00
Joshua MacDonald
3c8e1853f0
Separate InstrumentationLibrary from metric.Descriptor (#2197)
* factor instrumentation library out of the instrument descriptor

* SDK tests pass

* checkpoint work

* otlp and opencensus tests passing

* prometheus

* tests pass, working on lint

* lint applied: MetricReader->Reader

* comments

* Changelog

* Apply suggestions from code review

Co-authored-by: alrex <alrex.boten@gmail.com>

* remove an interdependency

* fix build

* re-indent one

* Apply suggestions from code review

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

* Lint&feedback

* update after rename

* comment fix

* style fix for meter options

* remove libraryReader, let Controller implement the reader API directly

* rename 'impl' field to 'provider'

* remove a type assertion

* move metric/registry into internal; move registry.MeterProvider into metric controller

* add test for controller registry function

* CheckpointSet->Reader everywhere

* lint

* remove two unnecessary accessor methods; Controller implements MeterProvider and InstrumentationLibraryReader directly, no need to get these

* use a sync.Map

* ensure the initOnce is always called; handle multiple errors

* Apply suggestions from code review

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

* cleanup locking in metrictest

* Revert "ensure the initOnce is always called; handle multiple errors"

This reverts commit 3356eb5ed0.

* Revert "use a sync.Map"

This reverts commit ea7bc599bd.

* restore the TODO about sync.Map

Co-authored-by: alrex <alrex.boten@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-27 08:51:47 -07:00
Tyler Yahn
92551d3933
Prerelease v1.0.0 (#2250)
* Update versions file for 1.0.0 release

* Prepare stable-v1 for version v1.0.0

* Update trace signal status in documentation

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2021-09-20 13:02:46 -07:00
Andrei Matei
61839133f3
zipkin: remove no-op WithSDKOptions (#2248)
This method did not have any effect. had been used back
when exporters were providing utility methods for setting up full
pipelines. These utilities went away in
4883cb119d.
2021-09-20 08:59:17 -07:00
Tigran Najaryan
568e7556dd
Set Schema URL when exporting traces to OTLP (#2242)
We previously were recording the Schema URL but were not setting
the recorded value when exporting. This change now uses the recorded
value when exporting to OTLP.
2021-09-16 12:33:39 -04:00
alrex
fe7058daa2
adding NewNoopMeterProvider to follow trace api (#2237)
* adding NewNoopMeterProvider to follow trace api

* Update CHANGELOG.md

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

* fix lint

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-09-13 09:14:32 -07:00
Tyler Yahn
ef126f5ce1
Remove deprecated Array from attribute package (#2235)
* Remove deprecated Array from attribute pkg

* Add changes to changelog

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-10 11:51:02 -04:00
Tyler Yahn
9e7812d1fe
Remove the deprecated oteltest package (#2234)
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-09 18:49:39 -04:00
Tyler Yahn
486afd347f
Remove the deprecated bridge/opencensus/utils pkg (#2233) 2021-09-09 18:07:30 -04:00
Anthony Mirabella
eaacfaa801
Fix slice-valued attributes when used as map keys (#2223)
* Fix slice-valued attributes when used as map keys

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

* store pointers to slice values to make them usable as map keys

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

* Emit slice-typed attribute values as slices, not pointers to slices

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-09-09 08:42:47 -07:00
Anthony Mirabella
4bfa00347d
Release prep v1.0.0-RC3 (#2218)
* Update release versions

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

* Prepare experimental-metrics for version v0.23.0

* Prepare bridge for version v0.23.0

* Prepare stable-v1 for version v1.0.0-RC3

* Update CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-09-03 11:23:58 -04:00
Tyler Yahn
04de34a2d6
Update the website getting started docs (#2203)
* Update the website getting started docs

Add a new example, fib, that contains an application for the computation
of Fibonacci numbers. Use this example to update the website getting
started documentation.

* Revise docs english

* Update example/fib/go.mod

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

* Add a What's Next section

* Clean up intro

* Apply suggestions from code review

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

* Apply feedback

* Return from Poll on error

* Update website_docs/getting-started.md

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>

* Add root and parent relationship info

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2021-09-02 08:22:41 -07:00
Joshua MacDonald
a7b9d02167
Rename metric instruments to match feature-freeze API specification (#2202)
* s/ValueRecorder/Histogram/g

* s/ValueObserver/GaugeObserver/g

* s/UpDownSumObserver/UpDownCounterObserver/g

* s/SumObserver/CounterObserver/g

* changelog

* pr num

* unstable->experimental

* Apply suggestions from code review

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

* Apply suggestions from code review

* apply feedback from @evantorrie by hand

* Apply suggestions from code review

Thanks

Co-authored-by: ET <evantorrie@users.noreply.github.com>

* Update sdk/export/metric/metric.go

* Apply suggestions from code review

Thank you @evantorrie !

Co-authored-by: ET <evantorrie@users.noreply.github.com>

* revert getting-started fix let tyler's update remove this text

* more variable name fixes

* test repair

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: ET <evantorrie@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-01 16:38:37 -04:00
Tyler Yahn
1f527a52ab
Update trace API config creation functions (#2212)
* Update trace API config creation funcs

Follow our style guide and return the config struct instead of pointers.

* Update changelog with changes

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-01 15:44:13 -04:00
Robert Pająk
361a209680
Fix RC2 header in changelog (#2215) 2021-09-01 11:53:11 -04:00
Roni Lichtman
c0c5ef65eb
Fix typos in resource.go. (#2201)
* Fix typos in resource.go.

* Add a line to CHANGELOG.md with an identifier for the relevant PR.

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-08-30 14:22:06 -04:00
Lucas Käldström
c912b179fd
Print JSON objects to stdout without a wrapping array (#2196)
* Encode JSON objects to stdout one by one; not wrapped in lists

* Add changelog entry
2021-08-25 08:48:48 -07:00
Lucas Käldström
add511c105
Make WithoutTimestamps work (#2195)
* Make WithoutTimestamps work

* Add changes to changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2021-08-23 14:29:51 -07:00
Tyler Yahn
3a26ed216a
Deprecate the oteltest package (#2188)
* Deprecate the oteltest package

* Add PR number to changes in changelog

* Ignore oteltest deprecation in oteltest
2021-08-18 13:34:48 -07:00
Bhautik Pipaliya
dfc866bd03
Support capturing stack trace (#2163)
* capturing stack trace support

* added changelog entry

* remove error package stack trace support

* modified unnecessary changes to go.sum files

* added EventOption to enable stack trace capturing

* added tests

* added runtime.Stack method and minor changes

* minor changes

* remove redundant line

* fix gihub check on linter

* fix tests

* fix tests

* Update sdk/trace/trace_test.go

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

* Update sdk/trace/trace_test.go

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

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-08-13 17:44:18 -04:00
Tyler Yahn
41588fea26
Deprecate the attribute.Any function (#2181)
* Deprecate the attribute.Any func

* Update CHANGELOG.md
2021-08-13 08:57:33 -07:00
Joshua MacDonald
4e8d667f6e
Support a single Resource per MeterProvider in the SDK (#2120)
* Remove resource from export.Record

* fix bridge/opencensus

* partial fixes in exporters/otlp/otlpmetric

* Use go-cmp to simplify exporter_test

* OTLP http/grpc

* prometheus

* fix stdout (pending PR 2015)

* oc bridge cleanups

* Lint and changelog

* pr num

* cleanup

* revert

* fix multiple

* always merge the environment

* lint

* precommit

* qualify package names in changelog
2021-08-12 15:44:58 -07:00
Tyler Yahn
87d09df346
Deprecate Array attribute in favor of *Slice types (#2162)
* Deprecate Array attribute in favor of *Slice types

* Use new attr types in Jaeger exporter

* Use slice attr types in otlpmetric

* Use slice attr types in otlptrace

* Use slice attr types in zipkin exporter

* Remove array attr test from deprectated oteltest func

* Use StringSlice for cmd arg resource attr

* Add changes to the changelog

* Remove use of deprecated Array func
2021-08-12 08:05:42 -07:00
Joshua MacDonald
df384a9a33
Move InstrumentKind into the new metric/sdkapi package (#2091)
* Move InstrumentKind into the new metric/sdkapi package

* remove the alias

* remove the alias (everywhere)

* Changelog

* Add a test

* merge updates

* fix changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-08-11 16:02:28 -07:00
Tyler Yahn
5d25c4d20e
Add support for int32 in attribute.Any (#2169)
* Support int32 for Any func in attribute pkg

* Add changes to changelog

* Update PR number in CHANGELOG.md
2021-08-11 09:32:00 -07:00
Tyler Yahn
a3d4ff5c0c
Deprecated the bridge/opencensus/utils package (#2166)
* Deprecated the bridge/opencensus/utils package

* Update PR number in CHANGELOG.md

* Apply suggestions from code review
2021-08-09 11:33:25 -07:00
Tyler Yahn
56c743ba79
Allow global ErrorHandler to be set multiple times (#2160)
* Add benchmarks for error handler

* All multiple global ErrorHandler sets

* Use ioutil instead of io for Discard

* Add changes to changelog

* Add unit tests for delegation
2021-08-06 10:05:32 -07:00
Koenraad Verheyden
21d4686f4f
Add ErrorHandlerFunc to simplify creating ErrorHandlers (#2149)
* Add ErrorHandlerFunc to simplify creating ErrorHandlers

* Add CHANGELOG entry

* Apply suggestions from code review

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

* Add interface assertion

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-08-03 15:15:54 -07:00
Robert Pająk
fd7c327b55
Fix Jaeger exporter agent port default value and docs (#2131)
* Fix Jaeger exporter agent port default value and docs

* Update changelog

* Revert example
2021-07-29 13:48:04 -04:00
Sean Schade
b8561785c0
fix(2138): add guard to constructOTResources to return an empty resource (#2139)
* fix(2138): add guard to constructOTResources to return an empty resource when attributes are not supplied

Fixes: https://github.com/open-telemetry/opentelemetry-go/issues/2138

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-07-29 10:09:07 -07:00
Tyler Yahn
11f62640ee
Add a SpanRecorder to the sdk/trace/tracetest (#2132)
* Add a SpanRecorder to the sdk/trace/tracetest

* Add changes to changelog

* Run make precommit

* Rename tests
2021-07-29 10:00:58 -07:00
Anthony Mirabella
7939841868
pre-release v1.0.0-RC2 (#2133)
* update versions for 1.0.0-RC2

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

* Prepare for versions v1.0.0-RC2

* Update CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-07-26 15:09:33 -04:00
Tyler Yahn
bbe6ca40a7
Deprecate oteltest.Harness for removal (#2123)
* Deprecate oteltest.Harness for removal

* Add changes to changelog

* Alias oteltest.Harness to internaltest

* Update oteltest/tracer_test.go

remove `oteltest` import.

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-07-26 11:40:36 -04:00
Tyler Yahn
7a624ac21c
Deprecated the oteltest.TraceStateFromKeyValues function (#2122)
* Deprecated the oteltest.TraceStateFromKeyValues func

* Update changelog

* make precommit
2021-07-26 11:12:53 -04:00
Nelson Ghezzi
ece1879fae
Removed dropped link's attributes field from API package (#2118)
* Removed DroppedAttributeCount field from Link struct

* Reintroduced DroppedAttributeCount with a wrapper struct

* Added Link type in otel/sdk package and used it instead of Trace API equivalent

* Added changelog entry

* Linting fix in changelog

* Deleted duplicated changelog section added by mistake

* Expanded changelog entry and moved it under the 'Added' section

* Explicitly mentioned otel/trace library in changelog entry under 'Removed' section to avoid ambiguity
2021-07-26 11:06:41 -04:00
Tyler Yahn
cb607b0ab1
Unify OTLP exporter retry logic (#2095)
* Add retry internal package

* Use retry package in connection

* Use retry package for otlpconfig

* Use the retry package in otlptracegrpc

* Use the retry package in otlptracehttp

* Add changes to CHANGELOG

* Lint internal

* Update otlptracehttp tests

* Update dependencies

* Add retry tests to otlptracehttp

* Remove TestRetry from otlptracehttp
2021-07-22 15:07:38 -07:00
Bhautik Pipaliya
abe2243718
API: create new linked span from current context (#2115)
* API: create new linked span from current context

* ran make precommit

* Update trace/trace.go

* Updated CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-07-22 11:39:27 -07:00