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

2286 Commits

Author SHA1 Message Date
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
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