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

735 Commits

Author SHA1 Message Date
Robert Pająk
5ec67e83df
otlptracehttp, otlpmetrichttp: Retry temporary HTTP request failures (#4679) 2023-10-31 08:06:25 +01:00
Robert Pająk
aea3eab43a
otlptracegrpc, otlpmetricgrpc: Retry for RESOURCE_EXHAUSTED only if RetryInfo is returned (#4669) 2023-10-30 22:03:55 +01:00
Robert Pająk
509c23eb73
otlptracehttp, otlpmetrichttp: Retry for 502, 504 HTTP statuses (#4670) 2023-10-30 19:59:57 +01:00
David Ashpole
a2e3e463c0
Add exemplar support to OpenCensus bridge (#4585)
* add exemplar support to OpenCensus bridge

* expand set of translated exemplar attributes

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-10-27 11:56:15 -05:00
David Ashpole
0f5565af4f
Add WithExplicitBucketBoundaries Histogram option to the metric api (#4603)
* Add WithExplicitBucketBoundaries Histogram option to the metric api

* Add note that the option is advisory

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-10-26 12:18:37 -05:00
David Ashpole
cdd9353641
Add summary data type to metricdata (#4622)
* add summary datatype

* support comparing summaries

* update wording based on SIG meeting feedback

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-10-25 09:38:19 -05:00
David Ashpole
7e6da12625
Prometheus exporter no longer collects metrics after shutdown (#4648)
* prometheus exporter no longer collects metrics after shutdown

* use errors.Is
2023-10-25 09:16:10 -05:00
Robert Pająk
d18277e3c6
Decouple otlpmetricgrpc and otlpmetrichttp from otlpmetric (#4660) 2023-10-24 14:20:46 +02:00
David Ashpole
cab95bcdef
Move view example into prometheus example, and deprecate /example/view (#4649)
* move view example into prometheus example, and deprecate /example/view

* fix lint

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-10-23 08:00:06 -07:00
Tyler Yahn
1e1cc901a5
Add embedded package to trace API (#4620)
* Add trace/embedded

* Update trace impl to use trace/embedded

* Add noop pkg to replace no-op impl in trace pkg

* Use trace/embedded in global impl

* Use trace/embedded in SDK impl

* Update opencensus bridge

* Update opentracing bridge

* Add changes to changelog

* Update trace/doc.go

Co-authored-by: David Ashpole <dashpole@google.com>

---------

Co-authored-by: David Ashpole <dashpole@google.com>
2023-10-19 10:16:24 -07:00
Robert Pająk
da343ab9c5
example/dice: Add context propagation (#4644) 2023-10-19 09:42:52 +02:00
Robert Pająk
28b459520c
Deprecate example/fib (#4618) 2023-10-13 08:26:35 +02:00
David Ashpole
1074d64d04
Add scope version to opencensus trace and metric bridges (#4584) 2023-10-11 08:48:58 +02:00
David Ashpole
68241aff1d
opencensus.NewMetricProducer returns a struct instead of the metric.Producer (#4583) 2023-10-09 16:04:32 +02:00
David Ashpole
0f09b9b2d8
Add options to opencensus bridge, and install tracer instead of returning (#4567)
* Add options to opencensus bridge, and install tracer instead of returning

* add unit test

* update unit tests

* fix example

* import ordering

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-09-29 08:07:06 -07:00
Tyler Yahn
60666c5540
Release v1.19.0/v0.42.0/v0.0.7 (#4568)
* Bump versions

* Prepare stable-v1 for version v1.19.0

* Prepare experimental-metrics for version v0.42.0

* Prepare experimental-schema for version v0.0.7

* Update changelog
2023-09-28 12:28:51 -07:00
David Ashpole
d3e31c3d93
Remove deprecated opencensus.NewMetricExporter (#4566) 2023-09-28 10:19:31 +02:00
Damien Mathieu
1410496022
stdoutmetric: Add WithWriter and WithPrettyPrint options (#4507)
* add WithWriter and WithPrettyOptions to stdoutmetric

* add changelog

* make WithWriter a shortcut to WithEncoder

* Update exporters/stdout/stdoutmetric/config.go

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-27 09:45:10 -05:00
Robert Pająk
0425c09c31
Add dice example (#4539)
* Add dice example

* Add manual instrumentation

* Update changelog

* Add comments

* Use naked return consistently

* Move handleFunc to main

* refactor: Extract newHTTPHandler

* Fix comment

* Improve comments

* Update example/dice/otel.go

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

* Simplify BaseContext

* Update doc.go

* Update example/dice/main.go

Co-authored-by: Phillip Carter <pcarter@fastmail.com>

* Rename span and metric names

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Phillip Carter <pcarter@fastmail.com>
2023-09-26 07:10:58 -07:00
Tyler Yahn
2ee71fdd4e
Release v1.19.0-rc.1/v0.42.0-rc.1 (#4510)
* Bump versions.yaml

Move go.opentelemetry.io/otel/sdk/metric to stable-v1.

* Prepare stable-v1 for version v1.19.0-rc.1

* Prepare experimental-metrics for version v0.42.0-rc.1

* Update changelog
2023-09-14 12:57:45 -07:00
Damien Mathieu
a87d8fd2e8
fix changelog entry, as 4499 hasn't been released yet (#4508) 2023-09-14 07:33:13 -07:00
Damien Mathieu
ac5639159f
Call scopeInfoMetrics only once even if it returns an error (#4499) 2023-09-14 09:51:51 +02:00
Aaron Abbott
bcbee2ac1a
Allow '/' character in instrument names (#4501)
* Allow '/' character in instrument names

* Add changelog

* Update CHANGELOG.md

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

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-09-13 09:01:34 -07:00
Tyler Yahn
4242228103
Release v1.18.0/v0.41.0/v0.0.6 (#4489)
* Bump versions

* Prepare stable-v1 for version v1.18.0

* Prepare experimental-metrics for version v0.41.0

* Prepare experimental-schema for version v0.0.6

* Update changelog

* Update CHANGELOG.md

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-09-12 07:54:37 -07:00
Damien Mathieu
ac4fca2260
Use a TB interface in metricdatatest (#4483)
* use testing.TB interface in metricdatatest

* add changelog entry

* use our own TB interface

* Update CHANGELOG.md

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

* rename TB to TestingT

* SIG meeting feedback

* ensure *testing.T implements TestingT

* Update sdk/metric/metricdata/metricdatatest/assertion.go

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

* change formatting for last testing.TB too

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-11 07:26:21 -07:00
Tyler Yahn
9737995cdb
Drop support for Go 1.19 (#4481)
* Drop support for Go 1.19

* Add change to changelog

* Bump all modules to 1.20

* Update exponential_histogram_test.go

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-07 12:18:29 -05:00
Rangel Reale
fc70923e53
Ignore value option for metricdatatest (#4447) 2023-09-05 19:00:06 +02:00
David Ashpole
02616a25c6
add WithProducer to the prometheus exporter (#4473) 2023-08-31 11:17:07 -07:00
Tyler Yahn
e0a39b8f7d
Fix bridge/opencensus NewMetricExporter deprecation notice (#4470)
* Fix bridge/opencensus NewMetricExporter dep notice

* Link to NewMetricProducer

* Add PR number to changelog
2023-08-29 15:02:43 -07:00
Tyler Yahn
e528731853
Remove the deprecated internal exporters/otlp* packages (#4469)
* Remove the deprecated otlpmetric/internal pkg

* Remove the deprecated otlp/internal pkg

* Remove the deprecated otlptrace/internal pkg

* Remove the deprecated otlptrace/internal/envconfig pkg

* Remove the deprecated otlptrace/internal/otlpconfig pkg

* Remove the deprecated otlptrace/internal/otlptracetest pkg

* Remove the deprecated otlptrace/internal/retry pkg

* Add changelog entry

* Remove dependabot entries

* Remove versions.yaml entry

* Run go mod tidy

* Remove linter override for removed pkgs

* Run crosslink
2023-08-29 14:08:07 -07:00
Tyler Yahn
d702e92c2b
Remove the deprecated sdk/metric/aggregation package (#4468)
* Remove the deprecated sdk/metric/aggregation package

* Update PR number
2023-08-29 13:19:33 -07:00
Tyler Yahn
537fd53e6e
Remove the deprecated Jaeger exporter and example (#4467)
* Remove the deprecated Jaeger exporter

* Add changelog stub

* Remove the deprecated Jaeger example

* Add changelog stub for example rm

* Add PR number to changelog

* Remove dependabot entries

* Remove versions.yaml entries
2023-08-29 11:13:25 -07:00
Tyler Yahn
3c476ce181
Release v1.17.0/v0.40.0/v0.0.5 (#4464)
* Bump versions.yaml

* Prepare stable-v1 for version v1.17.0

* Prepare experimental-metrics for version v0.40.0

* Prepare experimental-schema for version v0.0.5

* Update changelog

* Update changelog release header
2023-08-28 07:50:03 -07:00
Tyler Yahn
6be116e31e
Add testing support for Go 1.21 (#4463)
* Add testing support for Go 1.21

* Add PR number in changelog
2023-08-27 07:18:34 -07:00
Tyler Yahn
69611bd01a
Switch Stream back to having an AttributeFilter field and add New*Filter functions (#4444)
* Add allow/deny attr filters

* Revert "Replace `Stream.AttributeFilter` with `AllowAttributeKeys` (#4288)"

This reverts commit 1633c74aea.

* Rename new attr filter funcs

Do not include the term "Attribute" in a creation function of the
"attribute" pkg.

* Update the AttributeFilter field documentation

* Add tests for filter creation funcs

* Add change to changelog

* Apply feedback

* Use NewDenyKeysFilter for allow-all and deny-list filters

* Remove links from field docs

These links do not render.

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-08-25 07:39:43 -07:00
Robert Pająk
d78820e905
Deprecate exporters/jaeger (#4423)
* Deprecate exporters/jaeger

* Delete jaeger example

* Remove jaeger exporter from docs

* Remove example from docs

* Update CHANGELOG.md

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

* Revert "Delete jaeger example"

This reverts commit 1a2b47bc9a.

* Revert "Remove example from docs"

This reverts commit 682db01075.

* Add nolint comment

* Remove Jaeger from main README

* Deprecate example/jaeger

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Update go.mod

* Update main.go

* fix lint

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-08-15 08:54:50 -07:00
Tyler Yahn
3904523917
Flatten sdk/metric/aggregation into sdk/metric (#4435)
* Deprecate the aggregation pkg

* Decouple the internal/aggregate from aggregation pkg

* Add Aggregation to the metric pkg

* Do not use sdk/metric/aggregation in stdoutmetric exporter

* Update all generated templates

* Update prom exporter

* Fix view example

* Add changes to changelog

* Update CHANGELOG.md

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

* Rename Sum to AggregationSum

* Fix comments

* Centralize validation of aggregation in pipeline

* Remove validation of agg in manual_reader selector opt

* Fix merge

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-14 08:15:15 -07:00
Tyler Yahn
199dc34a09
Support default histogram selection in OTLP exporter (#4437)
* Support default histogram selection in OTLP exporter

* Add changes to changelog
2023-08-14 07:21:04 -07:00
David Ashpole
fe51391dc6
Change metric.Producer to be an Option on Reader (#4346)
* metric.Producer can be passed as an argument to Reader using
WithProducer

* reproduce data race

* revert to atomic.Value
2023-08-11 12:40:39 -07:00
Tyler Yahn
e9014a287c
Increase instrument name maximum length from 63 to 255 characters (#4434) 2023-08-11 09:49:47 +02:00
Robert Pająk
a9552aaffa
sdk/metric: Remove Reader.ForceFlush and ManualReader.ForceFlush (#4375) 2023-08-11 09:22:21 +02:00
Tyler Yahn
319cb3a3be
Deprecate the otlptrace/internal packages (#4425)
* Stop generating otlptrace/internal and deprecate

* Remove the tracetransform templates

They are no longer used.

* Add change stub to changelog

* Add PR number to changelog
2023-08-10 14:25:53 -07:00
Tyler Yahn
10d9038059
Use first-seen instrument name for name conflicts (#4428)
* Add acceptance test

* Return the first-seen for instrument name conflicts

* Add changes to changelog
2023-08-10 09:58:30 -07:00
Tyler Yahn
e3ed198611
Deprecate the otlpmetric/internal package and sub-packages (#4420)
* Deprecate the otlpmetric/internal package and sub-packages

* Add stub to changelog

* Add PR number to changelog stubs

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-08 09:19:17 -07:00
Tyler Yahn
25a6f15348
Deprecate the otlp/internal package and all sub-packages (#4421)
* Deprecate the otlp/internal package and all sub-packages

* Add deprecation to changelog

* No lint deprecated pkg use in otlpmetric

* Remove the unused header*.go files from otlptrace

* Use template wrappederror in otlptrace

* Add back removed header.go

* Replace use of WrapTracesError with fmt.Errorf

* Revert otlptrace/internal to main

* Deprecate retry module
2023-08-08 07:45:53 -07:00
Damien Mathieu
10099bb876
Handle 2xx as success for OTLP HTTP trace and metric exporters (#4365)
* handle no content responses for otlpmetric exporter

* handle no content responses for otlptraces http exporter

* add changelog entry

* add a ResponseStatus attribute rather than using error

* accept any status code between 200 and 299

* rename i to code

* switch require to assert

* shutdown the client in defer

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-08-07 10:32:44 -07:00
Jared Jenkins
b221025a4c
sdk/resource: Fix data race with emptyAttributes (#4409)
* Fix ASAN bug with emptyAttributes.

If mutliple instantiations of a Resources struct are happening
in parallel, they can end up modifying the same underlying resource.

* Capture literal

* add test

* remove unwanted change

* Update sdk/resource/resource_test.go

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

* Update sdk/resource/resource_test.go

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

* Update sdk/resource/resource_test.go

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

* Update sdk/resource/resource_test.go

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

* Add changelog.

* 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>
2023-08-07 10:22:48 -07:00
David Ashpole
e1e6b96647
do not append _total if the metric already ends in _total (#4373) 2023-08-07 10:12:57 -07:00
Tyler Yahn
9452b93012
Upgrade all use of semconv to v1.21.0 (#4408)
* Upgrade all use of semconv to v1.21.0

* Add change to changelog

* Add AIX and ZOS OS support

* Upgrade semconv for merged changes

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-07 09:30:40 -07:00
Tyler Yahn
d1f33f19b4
Decouple otlp/otlpmetric/otlpmetrichttp from otlp/internal and otlp/otlpmetric/internal using gotmp (#4407)
* Generate otlpmetrichttp/internal with gotmpl

* Use local internal pkg for otlpmetrichttp

* Add changes to changelog

* Fix rendered envconfig_test.go file name
2023-08-07 08:50:30 -07:00