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

2304 Commits

Author SHA1 Message Date
Robert Pająk
259143a662
baggage: Add NewMemberRaw and NewKeyValuePropertyRaw (#4804) 2024-01-10 14:02:57 +01:00
dependabot[bot]
6ead8d80e8
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 in /internal/tools (#4815)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.7)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 09:06:35 -08:00
Tyler Yahn
deddec38ac
Optimize (attribute.Set).Filter for no filtered case (#4774)
* Optimize Set.Filter for no filtered case

When all elements of the Set are kept during a call to Filter, do not
allocate a new Set and the dropped attributes slice. Instead, return the
immutable Set and nil.

To achieve this the functionality of filterSet is broken down into a
more generic filteredToFront function.

* Apply suggestions from code review

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

* Rename run to benchFn based on review feedback

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-01-08 07:49:45 -08:00
OpenTelemetry Bot
133f943694
dependabot updates Sun Jan 7 15:43:49 UTC 2024 (#4813)
Bump golang.org/x/sys from 0.15.0 to 0.16.0 in /sdk
2024-01-07 09:00:00 -08:00
dependabot[bot]
7cbe6a842d
Bump lycheeverse/lychee-action from 1.8.0 to 1.9.0 (#4812)
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  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>
2024-01-07 15:34:11 +01:00
OpenTelemetry Bot
e6c50b5924
dependabot updates Mon Jan 1 11:21:58 UTC 2024 (#4807)
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /exporters/prometheus
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /example/prometheus
2024-01-01 23:57:47 +01:00
CZ
27f70a3350
bridge/opentracing: fix baggage item key is canonicalized (#4776)
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
2023-12-28 18:46:17 +01:00
Robert Pająk
08b856faeb
baggage: Member.String encodes only when necessary (#4775) 2023-12-28 18:21:44 +01:00
dependabot[bot]
d23c060ced
Bump github.com/go-git/go-git/v5 from 5.9.0 to 5.11.0 in /internal/tools (#4800)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.9.0 to 5.11.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.9.0...v5.11.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-27 17:15:32 +01:00
OpenTelemetry Bot
1cfd83a1ee
dependabot updates Sun Dec 24 21:19:11 UTC 2023 (#4797)
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /sdk/metric
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/prometheus
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /sdk
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /exporters/zipkin
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /example/otel-collector
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace/otlptracegrpc
2023-12-25 20:21:38 +01:00
Robert Pająk
885210bf33
baggage: Fix escaping in Member.String (#4756)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-12-21 09:16:13 +01:00
Tyler Yahn
e3bf787c21
Add cardinality limiting to the metric SDK as an experimental feature (#4457)
* Add agg limiting func

* Add unit test for limitAttr

* Add limiting to aggregate types

* Add internal x pkg for experimental feature-flagging

* Connect cardinality limit to metric SDK

* Replace limitAttr fn with limiter type

The Attribute method is still inlinable.

* Use x.CardinalityLimit directly

* Simplify limiter test

* Add limiter benchmark

* Document the AggregationLimit field

* Test sum limits

* Test limit for last value

* Test histogram limit

* Refactor expo hist test to use existing fixtures

The tests for the exponential histogram create their own testing
fixtures. There is nothing these new fixtures do that cannot already be
done with the existing testing fixtures used by all the other aggregate
functions. Unify the exponential histogram testing to use the existing
fixtures.

* Test the ExponentialHistogram limit

* Fix lint

* Add docs

* Rename aggregation field to aggLimit

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-12-19 07:53:01 -08:00
Robert Pająk
cb8cb2d269
Add semconv v1.24.0 (#4770) 2023-12-19 14:44:32 +01:00
Robert Pająk
43bd47de6e
baggage: Fix Parse to validate member value before percent-decoding (#4755) 2023-12-19 14:38:58 +01:00
dependabot[bot]
15f0ab964c
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /internal/tools (#4771)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 04:13:58 +01:00
dependabot[bot]
4267974200
Bump actions/upload-artifact from 3 to 4 (#4763)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-17 08:36:18 -08:00
dependabot[bot]
528ab1244e
Bump github/codeql-action from 2 to 3 (#4762)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>
2023-12-17 08:20:44 -08:00
OpenTelemetry Bot
7df13f3435
dependabot updates Sun Dec 17 15:19:05 UTC 2023 (#4768)
Bump golang.org/x/tools from 0.16.0 to 0.16.1 in /internal/tools
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /example/otel-collector
Bump actions/upload-artifact from 3 to 4
Bump github/codeql-action from 2 to 3
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/grpc from 1.59.0 to 1.60.0 in /bridge/opentracing/test
2023-12-17 07:25:45 -08:00
Robert Pająk
8e756513a6
sdk/metric: Record measurements when context is done (#4671) 2023-12-15 19:14:16 +01:00
Cristian Velazquez
057f897096
baggage: Improve performance (#4743) 2023-12-14 16:48:28 +01:00
Robert Pająk
0c1c434c70
Add semconv/v1.23.1 (#4749)
* Add semconv/v1.23.1

* Update changelog

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-12-10 08:04:52 -08:00
dependabot[bot]
975939b26d
Bump actions/setup-go from 4 to 5 (#4751)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-10 07:58:06 -08:00
Tyler Yahn
215eae31c7
Refactor exponential histogram tests to use existing fixtures (#4747)
* Refactor expo hist test to use existing fixtures

The tests for the exponential histogram create their own testing
fixtures. There is nothing these new fixtures do that cannot already be
done with the existing testing fixtures used by all the other aggregate
functions. Unify the exponential histogram testing to use the existing
fixtures.

* Add alt input for cumulative test
2023-12-09 08:08:24 -08:00
David Ashpole
b5afa704f1
Fix multi-reader observable counter double-counting bug (#4742)
* fix Fix a bug where using multiple readers resulted in incorrect asynchronous counter values

* move addCallback to inserter

* restore comment
2023-12-08 14:21:30 -08:00
Robert Pająk
214d5e075f
Add semconv/v1.23.0 (#4746) 2023-12-07 07:29:21 +01:00
Tyler Yahn
d37d851bbc
Add the internal experimental metric feature package (#4715)
* Add the internal experimental metric feature pkg

* Interpret empty envvar same as unset

* Test Exemplars and CardinalityLimit

* Fix empty test for CardinalityLimit

* Abstract common testing patterns

* Add test cases from review feedback

* Rename assertions based on review feedback

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-12-06 10:36:21 -08:00
Tyler Yahn
9ccb0c618c
Backport semconv doc fix from #4735 (#4736)
This version (v1.21.0) of the semantic conventions is generated from the
semantic-conventions repository
(https://github.com/open-telemetry/semantic-conventions), not the
OpenTelemetry specification.
2023-12-05 20:20:17 +01:00
Tyler Yahn
6cee2b4a4c
Add semconv v1.22.0 (#4735) 2023-12-04 21:21:49 +01:00
OpenTelemetry Bot
0905a9d8ab
dependabot updates Sun Dec 3 16:09:27 UTC 2023 (#4740)
Bump golang.org/x/sys from 0.14.0 to 0.15.0 in /sdk
Bump github.com/itchyny/gojq from 0.12.13 to 0.12.14 in /internal/tools
Bump golang.org/x/tools from 0.15.0 to 0.16.0 in /internal/tools
2023-12-03 08:38:12 -08:00
xiehuc
88da778ba2
improve tracestate performance (#4722)
* improve tracestate performance

* use string.Builder to directly construct the result

* reduce the redundant copying during Insert

* avoid using regex

* fix lint

* revert changelog

* update comment

* refine code

* fix lint

* fix unittest

* Update trace/tracestate.go

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

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-12-02 08:58:20 -08:00
Alex Boten
6027c1ae76
add option for resource attributes in metrics for prometheus exporter (#4733)
* add option for resource attributes in metrics for prometheus exporter

This PR adds the `WithResourceAsConstantLabels` option to the Prometheus exporter to allow users to configure resource attributes to be applied on every metric.

Fixes #4732

Signed-off-by: Alex Boten <aboten@lightstep.com>

* add test, changelog

Signed-off-by: Alex Boten <aboten@lightstep.com>

* add test for including only a subset of tags, dont use a ptr

Signed-off-by: Alex Boten <aboten@lightstep.com>

* Update exporters/prometheus/config.go

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

* include feedback from review

Signed-off-by: Alex Boten <aboten@lightstep.com>

* cache results

Signed-off-by: Alex Boten <aboten@lightstep.com>

* removed map in favour of single keyVals

Signed-off-by: Alex Boten <aboten@lightstep.com>

* Update exporters/prometheus/config.go

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

* move check outside the createResourceAttributes and rename func

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-12-01 07:34:05 -08:00
xiehuc
04054929f1
improve trace_context performance (#4721)
* improve trace_context performance

* using strings.Builder instead of fmt.Sprint

* using strings.Cut instead of strings.Split

* using hex.Decode instead of hex.DecodeString

* avoid use regexp

* fix code style

* fix build

* update changelog

* refine code

* update comment

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-11-29 09:32:27 -08:00
David Ashpole
204be6157f
Fix data race in periodic reader tests (#4731) 2023-11-28 11:12:11 +01:00
dependabot[bot]
47ba653e69
Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (#4726)
Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.46.0 to 0.46.1.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.46.0...zpages/v0.46.1)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  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-11-19 07:50:13 -08:00
Robert Pająk
98b32a6c3a
Release 1.21.0/0.44.0 (#4724) 2023-11-16 21:11:06 +01:00
Robert Pająk
a27c53b9b5
Remove example/fib (#4723) 2023-11-16 19:51:04 +01:00
Robert Pająk
8ceba1368a
otlpmetrichttp otlptracehttp: Do not parse non-protobuf reponses (#4719) 2023-11-16 18:33:54 +01:00
Tyler Yahn
d96850905f
Update dependabot.yml (#4716) 2023-11-14 09:56:08 +01:00
Tyler Yahn
a2cb6044b2
Remove the deprecated otlpmetric module (#4707)
* Remove the deprecated otlpmetric module

* Add changelog entry

* Update versions.yaml

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-11-13 09:20:05 -08:00
Tyler Yahn
c8e60d1357
Remove the deprecated view example (#4708)
* Remove the deprecated view example

* Update PR number in changelog

* Update versions.yaml

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-11-13 08:40:40 -08:00
Tyler Yahn
27c5c7347b
Remove the deprecated NewTracer from OC bridge (#4706)
* Remove the deprecated NewTracer from OC bridge

* Update PR number in changelog

* Remove example test for NewTracer

---------

Co-authored-by: David Ashpole <dashpole@google.com>
2023-11-13 07:27:07 -08:00
OpenTelemetry Bot
491d65cdaa
dependabot updates Mon Nov 13 07:28:44 UTC 2023 (#4712)
Bump github.com/jcchavezs/porto from 0.5.1 to 0.6.0 in /internal/tools
Bump golang.org/x/tools from 0.14.0 to 0.15.0 in /internal/tools
Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp from 0.45.0 to 0.46.0 in /example/dice
2023-11-13 08:38:02 +01:00
Michael Blum
ca2b22b3be
Document PR commits preference in CONTRIBUTING.md (#4704) 2023-11-13 08:22:34 +01:00
Robert Pająk
85e4c467da
Release v1.20.0/v0.43.0 (#4705) 2023-11-10 17:42:33 +01:00
Robert Pająk
94a41d7464
logs: Update project status (#4702) 2023-11-10 07:32:30 +01:00
Michael Blum
be5064a387
Use url.PathUnescape rather than url.QueryUnescape when parsing OTLP headers and resource attributes env vars (#4698) (#4699) 2023-11-09 12:51:59 -06:00
Robert Pająk
0c5ebd5856
otlp: Refine documentation (#4695) 2023-11-08 17:18:12 +01:00
Robert Pająk
0f5179f4f1
Deprecate otlpmetric (#4693) 2023-11-06 19:01:10 +01:00
OpenTelemetry Bot
3560dc5959
dependabot updates Sun Nov 5 15:10:14 UTC 2023 (#4692)
Bump github.com/golangci/golangci-lint from 1.55.1 to 1.55.2 in /internal/tools
Bump golang.org/x/sys from 0.13.0 to 0.14.0 in /sdk
2023-11-05 07:17:26 -08:00
David Ashpole
163573775b
Add summary support in the OpenCensus bridge (#4668)
* support summaries in the OpenCensus bridge

* divide quantiles by 100
2023-11-02 15:07:41 -05:00