1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Commit Graph

2277 Commits

Author SHA1 Message Date
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) exporters/stdout/stdoutmetric/v0.44.0 exporters/prometheus/v0.44.0 exporters/otlp/otlpmetric/otlpmetricgrpc/v0.44.0 exporters/otlp/otlpmetric/otlpmetrichttp/v0.44.0 example/opencensus/v0.44.0 example/prometheus/v0.44.0 bridge/opencensus/test/v0.44.0 bridge/opencensus/v0.44.0 sdk/metric/v1.21.0 trace/v1.21.0 sdk/v1.21.0 metric/v1.21.0 exporters/stdout/stdouttrace/v1.21.0 exporters/zipkin/v1.21.0 exporters/otlp/otlptrace/otlptracegrpc/v1.21.0 exporters/otlp/otlptrace/v1.21.0 example/zipkin/v1.21.0 example/passthrough/v1.21.0 example/otel-collector/v1.21.0 example/namedtracer/v1.21.0 bridge/opentracing/test/v1.21.0 bridge/opentracing/v1.21.0 example/dice/v1.21.0 v1.21.0 exporters/otlp/otlptrace/otlptracehttp/v1.21.0 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) exporters/prometheus/v0.43.0 exporters/stdout/stdoutmetric/v0.43.0 exporters/otlp/otlpmetric/otlpmetrichttp/v0.43.0 exporters/otlp/otlpmetric/otlpmetricgrpc/v0.43.0 exporters/otlp/otlpmetric/v0.43.0 example/view/v0.43.0 example/prometheus/v0.43.0 example/opencensus/v0.43.0 bridge/opencensus/v0.43.0 bridge/opencensus/test/v0.43.0 sdk/metric/v1.20.0 sdk/v1.20.0 trace/v1.20.0 exporters/zipkin/v1.20.0 exporters/stdout/stdouttrace/v1.20.0 metric/v1.20.0 exporters/otlp/otlptrace/otlptracegrpc/v1.20.0 exporters/otlp/otlptrace/otlptracehttp/v1.20.0 example/passthrough/v1.20.0 exporters/otlp/otlptrace/v1.20.0 example/zipkin/v1.20.0 example/fib/v1.20.0 example/otel-collector/v1.20.0 example/namedtracer/v1.20.0 bridge/opentracing/v1.20.0 bridge/opentracing/test/v1.20.0 example/dice/v1.20.0 v1.20.0 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
Aaron Clawson 480edcc316 otlpmetricgrpc otlpmetrichttp: Add README.md (#4336) 2023-11-02 19:30:56 +01:00
David Ashpole e3d0c50f09 Use WithExplicitBucketBoundaries in the prometheus example (#4686) 2023-11-02 08:02:18 +01:00
Robert Pająk 437bc82bc4 otlptracegrpc otlpmetricgrpc: Remove redundant append of DialOptions (#4684) 2023-11-02 07:49:10 +01:00
Nathan J Mehl bdb9322ebd Use url.PathUnescape rather than url.QueryUnescape in baggage parsing (#4667)
* Use url.PathUnescape rather than url.QueryUnescape

I believe this addresses the majority of the cases described in
https://github.com/open-telemetry/opentelemetry-go/issues/3601

Golang's url.QueryUnescape will render url _path_ elements (e.g. /, +)
as spaces: `foo+bar` is rendered as `foo bar`.  Path elements are (as I
read the spec) legal W3C baggage values, and replacing them with spaces
fails the value validation regex.

url.PathEscape allows path elements through unmolested.

Signed-off-by: Nathan J. Mehl <n@oden.io>

* Update CHANGELOG.md

address comments

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

---------

Signed-off-by: Nathan J. Mehl <n@oden.io>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-10-31 15:02:17 -07:00
John Bley ce7b40afa9 trace: Reduce regexp memory use in tracestate (#4664) 2023-10-31 08:51:47 +01:00
David Ashpole b2bb2ad00f Implement WithExplicitBucketBoundaries option in the metric SDK (#4605) 2023-10-31 08:41:27 +01:00
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
OpenTelemetry Bot fcc1129d0a dependabot updates Sun Oct 29 15:19:32 UTC 2023 (#4678)
Bump go.uber.org/goleak from 1.2.1 to 1.3.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/golangci/golangci-lint from 1.55.0 to 1.55.1 in /internal/tools
Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 in /exporters/zipkin
Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 in /sdk
Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 in /sdk/metric
Bump github.com/go-logr/logr from 1.2.4 to 1.3.0
2023-10-29 08:33:40 -07: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
OpenTelemetry Bot 16643aea30 dependabot updates Sun Oct 22 14:44:37 UTC 2023 (#4659)
Bump github.com/golangci/golangci-lint from 1.54.2 to 1.55.0 in /internal/tools
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.58.3 to 1.59.0 in /example/otel-collector
2023-10-22 07:51:26 -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 5b28921940 [chore] Add gosec via golangci-lint (#4645) 2023-10-19 08:47:07 +02:00
Robert Pająk 78ea001442 [chore] Use tilde range to specify Go version (#4643) 2023-10-18 08:14:16 +02:00
Tyler Yahn 5dff273a1e Use gofumpt instead of gofmt (#4623)
* Use gofumpt instead of gofmt in golangci-lint conf

* Run gofumpt fixes

* Format generated templates

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-10-16 10:02:21 -07:00
Robert Pająk 9900450477 [chore] Use check-latest in actions/setup-go (#4617) 2023-10-16 11:20:21 +02:00
OpenTelemetry Bot c047088605 dependabot updates Sun Oct 15 14:43:01 UTC 2023 (#4637)
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /trace
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /example/otel-collector
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /exporters/zipkin
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.58.2 to 1.58.3 in /exporters/otlp/otlptrace/otlptracehttp
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0
Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 in /sdk
2023-10-15 07:53:27 -07:00
Robert Pająk d943f0fd1b sdk/trace: Fix ParentBased comment (#4604) 2023-10-13 19:51:11 +02:00
Robert Pająk 28b459520c Deprecate example/fib (#4618) 2023-10-13 08:26:35 +02:00
Aaron Clawson 8a923d0c7a Update the benchmarks to only record/display select benchmarks. (#4560)
* Add a benchmark target to makefile

* update CI to reflect how the benchmarks will be used

* Add auto-push to benchmarks branch.

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-10-12 12:00:18 -05:00