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

1908 Commits

Author SHA1 Message Date
Tyler Yahn
80f187fd0d
Bump CI default version of Go to 1.20 (#3733)
* Bump CI default version of Go to 1.20

* Use crypto/rand in Jaeger exporter testing

* Use crypto/rand Reader in otlp exporters

* Remove use of dep rand.Seed in prometheus exporter

* Update changelog with public changes

* Quote DEFAULT_GO_VERSION value

* Update .github/workflows/ci.yml

* Update CHANGELOG.md

Co-authored-by: Damien Mathieu <42@dmathieu.com>

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
2023-02-16 08:33:12 -08:00
Peter Liu
d68b05fbee
Refactor package internal/attribute to not use generics. (#3725)
* remove generics

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update internal/attribute/attribute.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* refactor unit test

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>

* add changelog

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>

* update changelog

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>

* Update internal/attribute/attribute.go

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

* replace interface{} with any

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>

---------

Signed-off-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-15 10:37:07 -08:00
OpenTelemetry Bot
0062bb65ce
dependabot updates Tue Feb 14 16:33:36 UTC 2023 (#3729)
Bump go.uber.org/goleak from 1.2.0 to 1.2.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /bridge/opentracing/test
2023-02-14 08:52:06 -08:00
Yuri Shkuro
68975917e5
[bridge/ot] Fall-back to TextMap carrier when it's not ot.HttpHeaders (#3679)
* [bridge/ot] Fall-back to TextMap carrier when it's not ot.HttpHeaders

Signed-off-by: Yuri Shkuro <github@ysh.us>

* changelog

* go mod tidy

* format

* fix deps

* delint

* simplify

* undo

* Fix changelog

* Move new tests under test/

* go fmt

* delint

Signed-off-by: Yuri Shkuro <github@ysh.us>

---------

Signed-off-by: Yuri Shkuro <github@ysh.us>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-02-14 08:01:55 -08:00
Tyler Yahn
f3b4813f2f
Add semconv/v1.18.0 (#3719)
* Add semconv/v1.18.0

* Add PR number to changelog
2023-02-13 13:51:11 -08:00
Anthony Regeda
441a173514
No memory leakage in attributes filter (#3695)
The attributes filter collects seen attributes in order to avoid
filtration on the same attribute set. However, the `attribute.Set` is
not comparable type and new allocations of sets with same attributes will be
considered as new sets.

Metrics with a high cardinality of attributes consume a lot of memory
even if we set a filter to reduce that cardinality.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-13 08:07:06 -08:00
Damien Mathieu
68aa5984fd
update dmathieu's affiliation (#3721) 2023-02-13 07:28:30 -08:00
OpenTelemetry Bot
f5a149772a
dependabot updates Sun Feb 12 17:20:31 UTC 2023 (#3718)
Bump go.opentelemetry.io/build-tools/multimod from 0.5.0 to 0.6.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/crosslink from 0.5.0 to 0.6.0 in /internal/tools
Bump golang.org/x/tools from 0.5.0 to 0.6.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/semconvgen from 0.5.0 to 0.6.0 in /internal/tools
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /exporters/otlp/otlpmetric
Bump go.opentelemetry.io/build-tools/dbotconf from 0.5.0 to 0.6.0 in /internal/tools
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.52.3 to 1.53.0 in /example/otel-collector
2023-02-12 09:34:31 -08:00
Anthony Mirabella
2f3c6df7bb
Add semantic conventions of the event type (#3697)
* Add semantic conventions of the `event` type

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

* Update CHANGELOG

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

* Update CHANGELOG.md

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

---------

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-09 12:40:15 -08:00
Mackenzie
e9bdda0e68
WithContainerID: Document ECS limitation. (#3639)
* WithContainerID: Document ECS limitation.

WithContainerID is not able to extract the correct container id in an ECS environment. The ECS resource detector should be used instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs).
See #3633.

* fix lint

* Update sdk/resource/config.go

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-09 11:03:39 -08:00
dependabot[bot]
d5fca833d6
Bump github.com/golangci/golangci-lint in /internal/tools (#3690)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.51.0 to 1.51.1.
- [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.51.0...v1.51.1)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 14:48:13 -08:00
Tyler Yahn
fb5c599833 Bump default Go version to 1.19 (#3694) 2023-02-08 14:21:16 -08:00
Tyler Yahn
a7fb378ad9
Add testing for Go 1.20 (#3693)
* Add testing for Go 1.20

* Update PR number in changelog

* Quote 1.20 in ci.yml
2023-02-08 14:08:57 -08:00
dependabot[bot]
01ae3fbb49
Bump golang from 1.18-alpine to 1.20-alpine in /example/zipkin (#3691)
Bumps golang from 1.18-alpine to 1.20-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-02-07 14:27:07 -08:00
Tyler Yahn
ddf393886c
Use semconv creation functions (#3683) 2023-02-07 13:42:47 -08:00
Tyler Yahn
a4f646d054
Update dependabot config (#3684)
Use the latest dbotconf to correctly identify the directory a Dockerfile
is located that needs to be updated by dependabot.
2023-02-07 13:23:53 -08:00
Anthony Mirabella
f2fd476f43
Prepare v1.13.0/v0.36.0 release (#3688)
* update versions.yaml for release

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

* Prepare stable-v1 for version v1.13.0

* Prepare experimental-metrics for version v0.36.0

* Update CHANGELOG

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

---------

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2023-02-07 14:34:41 -05:00
Tyler Yahn
7b74959132
Remove http.target attr from ServerRequest (#3687)
* Remove http.target attr from ServerRequest

* Update changelog

* Remove trailing space in changelog
2023-02-07 14:12:41 -05:00
Tyler Yahn
0446207a38
Add funcs to semconv to create semantic convention KeyValues (#3675)
* Add semconv KeyValue funcs

* Add changes to changelog

* Variadic slice func parameters

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-02-06 09:41:41 -08:00
dependabot[bot]
d3986efdb7
Bump github.com/golangci/golangci-lint in /internal/tools (#3676)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.50.1 to 1.51.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.50.1...v1.51.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 07:56:39 -08:00
Patrice Chalin
c9cb53c5b4
Update libraries.md (#3638) 2023-02-03 07:48:23 -08:00
Aaron Clawson
5e8eb855bf
Add a benchmark for histogram allocations (#3635)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-02-02 10:16:25 -08:00
Tyler Yahn
aa5122490e
Remove the deprecated instrument packages (#3631)
* Remove the deprecated instrument packages

* Update changelog

* Add PR number
2023-01-31 08:12:39 -08:00
OpenTelemetry Bot
cfed99561d
dependabot updates Sun Jan 29 16:46:30 UTC 2023 (#3629)
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.52.0 to 1.52.3 in /example/otel-collector
2023-01-29 09:43:47 -08:00
Tyler Yahn
6cb5718eaa
Release v1.12.0/v0.35.0 (#3623)
* Update module versions

* Prepare stable-v1 for version v1.12.0

* Prepare experimental-metrics for version v0.35.0

* Prepare experimental-schema for version v0.0.4

* Update the CHANGELOG

* Undo bump to experimental-schema

Revert to original version as nothing has changed.

* Fix PR number in changelog

* Move change from #3497 into current release
2023-01-29 07:41:22 -08:00
Joshua MacDonald
ec13377b6b
OTLP traces export errors use a consistent error message prefix (#3516)
* OTLP traces export errors use a consistent error message prefix

* use a wrapped error

* update changelog

* merge changelog

* Update CHANGELOG.md

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-01-27 10:42:15 -08:00
Tyler Yahn
af3db6e8be
Update ServerRequest to accept server name (#3619)
* Update ServerRequest to accept server name

* Update docs to include Apache and nginx examples

* Test the server not containing a port
2023-01-26 11:55:13 -08:00
Tyler Yahn
7e5d903305
Use opentelemetrybot for dependabot PR action (#3616) 2023-01-26 11:16:04 -08:00
Tyler Yahn
c61d2f0108
Link check ignore GH projects link (#3620) 2023-01-26 11:01:01 -08:00
Tyler Yahn
7f4d76ab7a
Use Extrema type for Histogram min/max (#3550)
* Use Extrema type for Histogram min/max

* Add case for Extrema in AssertHasAttributes

* Add changes to changelog

* Add NewExtrema

* Add metricdatatest tests

* Use getter for Extrema

* Fix Extrema doc language

* Correct dataset to be one word

* Ensure multiple extrema are tested in a dataset
2023-01-26 10:49:58 -08:00
Tyler Yahn
604772dda3
Change ClientResponse to accept an *http.Response (#3617) 2023-01-26 09:21:55 -08:00
Tyler Yahn
c0fb8dec4c
Remove the unneeded Observe method from the async instruments (#3586)
* Update RegisterCallback and Callback decls

RegisterCallback accept variadic Asynchronous instruments instead of a
slice.

Callback accept an observation result recorder to ensure instruments
that are observed by a callback.

* Update global impl

* Update noop impl

* Update SDK impl

* Fix prometheus example

* Fix metric API example_test

* Remove unused registerabler

* Rename ObservationRecorder to MultiObserver

* Update Callback documentation about MultiObserver

* Remove the Observe method from async inst

* Revert to iface for Observers

* Fix async inst docs

* Update global async delegate race test

* Restore removed observe doc

* Remove TODO

* Remove stale comment

* Update changelog
2023-01-25 12:58:09 -08:00
Tyler Yahn
c7e2679529
Generate the semconv/v1.17.0 package (#3599)
* Generate semconv/v1.17.0

* Update all semconv use to v1.17

* Add changes to changelog
2023-01-24 08:10:41 -08:00
Tyler Yahn
828892954b
Update the RegisterCallback of the SDK meter (#3604) 2023-01-24 07:56:11 -08:00
github-actions[bot]
697bc18d29
dependabot updates Mon Jan 23 17:28:58 UTC 2023 (#3613)
Bump go.opentelemetry.io/build-tools/semconvgen from 0.4.0 to 0.5.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/dbotconf from 0.4.0 to 0.5.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/multimod from 0.4.0 to 0.5.0 in /internal/tools
Bump go.opentelemetry.io/build-tools/crosslink from 0.4.0 to 0.5.0 in /internal/tools

Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
2023-01-23 12:44:16 -05:00
Tyler Yahn
a1ce7e5f0d
Combine precomputed values of filtered attribute sets (#3549)
* Combine spatially aggregated precomputed vals

Fix #3439

When an attribute filter drops a distinguishing attribute during the
aggregation of a precomputed sum add that value to existing, instead of
just setting the value as an override (current behavior).

* Ignore false positive lint error and test method

* Add fix to changelog

* Handle edge case of exact set after filter

* Fix filter and measure algo for precomp

* Add tests for precomp sums

* Unify precomputedMap

* Adds example from supplimental guide

* Fixes for lint

* Update sdk/metric/meter_example_test.go

* Fix async example test

* Reduce duplicate code in TestAsynchronousExample

* Clarify naming and documentation

* Fix spelling errors

* Add a noop filter to default view

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-01-20 09:54:42 -08:00
Tyler Yahn
88f6000318
Remove the unused produceKey and callbackKey (#3602)
Following #3584, this value and type are no longer used.
2023-01-20 09:44:25 -08:00
Tyler Yahn
b1a8002c4c
Remove stale comments from metric global (#3603)
The Observe is not used to record measurements following #3584.
2023-01-19 10:44:37 -08:00
Tyler Yahn
69b18e62a7
Redesign RegisterCallback API (#3584)
* Update RegisterCallback and Callback declerations

RegisterCallback accepts variadic Asynchronous instruments instead of a
slice.

Callback accepts an observation result recorder to ensure instruments
that are observed by a callback.

* Update global, noop, SDK implementations
* Fix examples
* Add changes to changelog
* Test RegisterCallback for invalid observers
* Test callbacks from foreign sources not collected
* Support registering delegating instruments
2023-01-19 08:18:26 -06:00
github-actions[bot]
e8c6e45178
dependabot updates Mon Jan 16 15:58:25 UTC 2023 (#3596)
Bump google.golang.org/grpc from 1.51.0 to 1.52.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.51.0 to 1.52.0 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.51.0 to 1.52.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.51.0 to 1.52.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.51.0 to 1.52.0 in /example/otel-collector

Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
2023-01-16 08:14:50 -08:00
Tyler Yahn
f941b3a8df
Restructure RegisterCallback method (#3587)
* Restructure RegisterCallback method

Instead of accepting instruments to register the callback with as a
slice, accept them as variadic arguments.

* Add changes to changelog

* Add PR number to changes
2023-01-13 08:31:14 -08:00
Tyler Yahn
42863522e5
Update ClientRequest HTTPS determination (#3577)
* Update ClientRequest HTTPS determination

The ClientRequest function will only report a peer port attribute if
that peer port differs from the standard 80 for HTTP and 443 for HTTPS.
In determining if the request is for HTTPS use the request URL scheme.
This is not perfect. If a user doesn't provide a scheme this will not be
correctly detected. However, the current approach of checking if the
`TLS` field is non-nil will always be wrong, requests made by client
ignore this field and it is always nil. Therefore, switching to using
the URL field is the best we can do without having already made the
request.

* Test HTTPS detection for ClientRequest
2023-01-12 16:01:51 -08:00
Robert Lin
640a0cd8bc
bridge/opentracing: introduce NewTracerProvider that wraps TracerProvider instead of Tracer (#3116)
* bridge/opentracing: add NewDynamicWrappedTracerProvider for named tracers

* bridge/opentelmeetry: cache created Tracers, add tests

* bridge/opentracing: rename constructor to NewTracerProvider

* add license header

* Update docstring

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

* fix deprecated docstring

* rewrite new lookup TracerProvider as separate type

* update docstring

* add changelog entries

* Update bridge/opentracing/provider.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2023-01-11 16:59:06 -08:00
Tyler Yahn
89cb6a4462
Update single asynchronous example to use inst opt (#3574)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-01-10 21:21:58 -08:00
Martin Evgeniev
96d5de1181
Update manual.md (#3582)
Fix typo

Missing ',' before newline in argument list

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-01-10 15:22:56 -08:00
Tyler Yahn
36904e4463
Deprecate the syncint64/syncfloat64/asyncint64/asyncfloat64 packages (#3575)
* Dep async/sync pkgs for new inst in instrument pkg

* Replace use of deprecated instruments

* Add changelog entry

* Update changelog entry PR number
2023-01-10 15:06:24 -08:00
Tyler Yahn
78a55822f8
Upgrade all semconv dependencies to v1.16.0 (#3581)
* Upgrade all semconv ref to v1.16.0

* Add changes to changelog
2023-01-10 10:57:28 -08:00
Tyler Yahn
479c5c5840
Generate semconv/v1.16.0 (#3579)
* Generate semconv/v1.16.0

* Add changes to changelog
2023-01-08 08:12:25 -08:00
Tyler Yahn
b08ebeb187
Generate semconv/v1.15.0 (#3578)
* Add generated semconv/v1.15.0

* Add changelog entry for changes

* Update PR number in changelog entry
2023-01-08 08:01:08 -08:00
Tyler Yahn
82882dfbd3
Have multi-instrument callback return an error (#3576)
* Have multi-inst callback return an error

* Update PR number in changelog entry

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-01-08 07:53:07 -08:00