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

2160 Commits

Author SHA1 Message Date
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
Robert Pająk
6f64e5b4be
Add gorelease Make target (#4431)
* Add gorelease Make target

* Igonre exit code and add blank line

* Add GORELEASE to tools

* Apply suggestions from code review

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

* Update RELEASING.md

* Run go mod tidy

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2023-08-14 07:42:08 -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
OpenTelemetry Bot
af1d928b2b
dependabot updates Sun Aug 13 14:28:57 UTC 2023 (#4443)
Bump github.com/golangci/golangci-lint from 1.53.3 to 1.54.1 in /internal/tools
Bump go.opentelemetry.io/build-tools/gotmpl from 0.10.0 to 0.11.0 in /internal/tools
Bump golang.org/x/tools from 0.11.1 to 0.12.0 in /internal/tools
Bump github.com/openzipkin/zipkin-go from 0.4.1 to 0.4.2 in /exporters/zipkin
2023-08-13 07:36:30 -07:00
dependabot[bot]
29e646431e
Bump golang from 1.20-alpine to 1.21-alpine in /example/zipkin (#4438)
Bumps golang from 1.20-alpine to 1.21-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-13 07:24:39 -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
7b9fb7ac87
Add lint to check for known cross-module internal packages (#4426)
* Add depguard conf for cross-mod internal pkg check

* Apply feedback

* Apply suggestions from code review

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-11 07:35:02 -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
c513972985
Generate internal/matchers (#4430) 2023-08-10 16:00:53 -07: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
b44a2bbc36
Remove commented out method in exponential_histogram.go (#4429) 2023-08-10 09:23:25 +02:00
Tyler Yahn
d9afe946d4
Document cross-module internal package rule (#4427)
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-09 15:12:17 -07:00
Tyler Yahn
b7f634a4fe
Decouple use of otel/internal/internaltest (#4424)
* Add internaltest templates

* Generate internaltest using gotmpl

* Generate the sdk/internal/internaltest pkg

* Use sdk/internal/internaltest in sdk module

* Generate exporters/jaeger/internal/internaltest pkg

* Use exporters/jaeger/internal/internaltest in jaeger exporter

* Generate the exporters/zipkin/internal/internaltest pkg

* Use local internaltest in zipkin exporter

* Fix import path name in trace test
2023-08-09 09:15:47 +02: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
Robert Pająk
663151966d
Minor refactoring (#4417) 2023-08-08 14:26:44 +02:00
Robert Pająk
b8e8e5eb8b
metric: Recommend defining units in UCUM (#4418)
* metric: Recommend defining units in UCUM

* Update metric/instrument.go

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

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-08-08 14:16:58 +02: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
196c1f0a83
Fix rendered envconfig_test.go file name in otlpmetricgrpc (#4419) 2023-08-07 17:58:27 +02: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
OpenTelemetry Bot
ac6cd49ae2
dependabot updates Sun Aug 6 09:27:21 UTC 2023 (#4416)
Bump golang.org/x/sys from 0.10.0 to 0.11.0 in /sdk
Bump golang.org/x/tools from 0.11.0 to 0.11.1 in /internal/tools
Bump go.opentelemetry.io/build-tools/crosslink from 0.10.0 to 0.11.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/semconvgen from 0.10.0 to 0.11.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/dbotconf from 0.10.0 to 0.11.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/multimod from 0.10.0 to 0.11.0 in /internal/tools
2023-08-06 11:37:32 +02:00
Aaron Clawson
248413d654
Add the Exponential Histogram Aggregator. (#4245)
* Adds Exponential Histograms aggregator

* Added aggregation to the pipeline.

Adjust to new bucket

* Add no allocation if cap is available.

* Expand tests

* Fix lint

* Fix 64 bit math on 386 platform.

* Fix tests to work in go 1.19.
Fix spelling error

* fix codespell

* Add example

* Update sdk/metric/aggregation/aggregation.go

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

* Update sdk/metric/aggregation/aggregation.go

* Update sdk/metric/aggregation/aggregation.go

* Changelog

* Fix move

* Address feedback from the PR.

* Update expo histo to new aggregator format.

* Fix lint

* Remove Zero Threshold from config of expo histograms

* Remove DefaultExponentialHistogram()

* Refactor GetBin, and address PR Feedback

* Address PR feedback

* Fix comment in wrong location

* Fix misapplied PR feedback

* Fix codespell

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-08-04 11:57:44 -07:00
Tyler Yahn
f67ecb35dc
Decouple otlp/otlpmetric/otlpmetricgrpc from otlp/internal and otlp/otlpmetric/internal using gotmp (#4404)
* Add shared otlpmetric templates

* Generate otlpmetricgrpc/internal with gotmpl

* Use local internal in otlpmetricgrpc

* Add decoupling change to changelog
2023-08-03 17:08:49 -07:00
Tyler Yahn
2e6ca0af0c
Decouple otlp/otlptrace/otlptracegrpc from otlp/internal and otlp/otlptrace/internal using gotmpl (#4400)
* Use template retry pkg in otlpconfig

* Template out all otlptrace internal

* Add envconfig pkg to otlptrace/internal

* Generate otlptrace/internal/otlpconfig

* Revert templatizing otlptracegrpc

* Add changes to changelog

* Add partialsuccess to internal shared

* Use gotmpl to generate otlptracegrpc/internal

* Add changes to changelog
2023-08-03 13:51:45 -07:00
Tyler Yahn
58c9cf65d6
Decouple otlp/otlptrace/otlptracehttp from otlp/internal and otlp/otlptrace/internal using gotmpl (#4401)
* Use template retry pkg in otlpconfig

* Template out all otlptrace internal

* Add envconfig pkg to otlptrace/internal

* Generate otlptrace/internal/otlpconfig

* Revert templatizing otlptracegrpc

* Add changes to changelog

* Fix lint

* Add partialsuccess to internal shared

* Use gotmpl to generate otlptracehttp/internal

* Add change to changelog
2023-08-03 13:34:48 -07:00
George Kontridze
9ec9cead50
Fix typo in exporters/README.md (#4402) 2023-08-02 13:53:35 -07:00
Tyler Yahn
4928282877
Decouple otlp/otlptrace/internal from otlp/internal using gotmpl (#4397)
* Add gotmpl

* Add shared retry pkg

* Use template retry pkg in otlpconfig

* Update license-check to look at first 4 lines

* Template out all otlptrace internal

* Add envconfig pkg to otlptrace/internal

* Generate otlptrace/internal/otlpconfig

* Revert templatizing otlptracegrpc

* Add changes to changelog

* Fix lint

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-08-02 12:28:35 -07:00
Robert Pająk
c4d2d7c9b8
sdk/metric: Add unit tests for Shutdown WithTimeout (#4379)
* sdk/metric: Improve WithTimeout doc

* Add tests
2023-08-02 07:52:04 -07:00
Tyler Yahn
378e51e365
Do not block Temporality/Aggregation on OTLP metric export (#4395)
* otlpmetricgrpc - no block temp/agg selection with export

* otlpmetrichttp - no block temp/agg selection with export

* Add test Export doesn't block Temporality or Aggregation

* Deprecate internal New and Exporter

* Add changes to changelog

* Apply suggestions from code review
2023-08-02 07:38:04 -07:00
David Ashpole
528a0cb34f
Expand the set of units supported by the prometheus exporter (#4374) 2023-08-02 08:34:28 +02:00
Tyler Yahn
2899fcfdca
Document the Reader and Exporter concurrent safe requirements (#4381) 2023-07-30 22:26:17 +02:00
OpenTelemetry Bot
bf29fc6f68
dependabot updates Sun Jul 30 14:33:02 UTC 2023 (#4393)
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /example/otel-collector
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump go.opentelemetry.io/build-tools/crosslink from 0.9.0 to 0.10.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/multimod from 0.9.0 to 0.10.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/semconvgen from 0.9.0 to 0.10.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/dbotconf from 0.9.0 to 0.10.0 in /internal/tools
2023-07-30 07:40:04 -07:00
Tyler Yahn
9418aca877
Use PeriodicReader timeout for ForceFlush (#4377)
* Use PeriodicReader timeout for ForceFlush

Prioritize the user passed context deadline if it has one.

* Update changelog
2023-07-29 07:33:48 -07:00
Tyler Yahn
859a87098c
Simplify the histogram implementation (#4370) 2023-07-27 14:06:22 -07:00
Robert Pająk
4f0d73cbc2
sdk/trace: Refine context cancellation in batchSpanProcessor.ForceFlush (#4369) 2023-07-27 10:05:52 +02:00
Tyler Yahn
b4264c53bc
Simplify the sum aggregators (#4357)
* Simplify the sum aggregators

* Comment how memory reuse misses are handled
2023-07-26 13:32:45 -07:00
Robert Pająk
830fae8d70
Add semconv/v1.21.0 (#4362)
* Update tooling to point to new repository
* Update changelog
* Remove leftovers
* generate semconv/v1.21.0
2023-07-26 17:09:04 +02:00
Robert Pająk
d5d631852a
Remove redundant TestBatchSpanProcessorForceFlushCancellation (#4367) 2023-07-26 13:51:21 +02:00
Robert Pająk
85afa3d8fe
Fix typo in README.md (#4366) 2023-07-26 13:34:15 +02:00
Robert Pająk
e557e74cc2
Improve readers Collect docs (#4361) 2023-07-26 12:14:44 +02:00
Aaron Clawson
d423bd4cf2
Add tests for malformed selectors in readers (#4350) 2023-07-25 11:25:38 +02:00
David Ashpole
c1a644a10c
PeriodicReader.Shutdown now applies the periodic reader's timeout by default (#4356) 2023-07-25 11:00:16 +02:00
Robert Pająk
d8d3502efc
sdk/metric: Fix goroutine leaks in tests (#4352) 2023-07-25 10:54:08 +02:00
Robert Pająk
088ac8e179
Fix panic, deadlock and race in BatchSpanProcessor (#4353) 2023-07-25 10:13:45 +02:00
Tyler Yahn
e26d8bd8f8
Remove benchmark dev files mistakenly added in #4349 (#4358) 2023-07-24 11:03:09 -07:00