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

819 Commits

Author SHA1 Message Date
Alex Boten
8778c38832
docs: minor update to docstring (#4833)
Signed-off-by: Alex Boten <aboten@lightstep.com>
2024-01-19 15:18:16 +01:00
Tyler Yahn
1e2555f380
Release v1.23.0-rc.1 (#4832)
* Update versions.yaml

Move experimental-metrics modules that are stbilizing to the stable-v1
module-set.

* Prepare stable-v1 for version v1.23.0-rc.1

* Update changelog
2024-01-18 12:26:17 -08:00
Aaron Clawson
279c549cab
Release v1.22.0/v0.45.0 (#4821)
* Update to v1.22.0

* Prepare stable-v1 for version v1.22.0

* Prepare experimental-metrics for version v0.45.0
2024-01-17 13:24:10 -06:00
Liz Fong-Jones
4491b39db2
sdk/trace: use slices.Grow() to avoid excessive runtime.growslice() (#4818)
* sdk/trace: use slices.Grow() to avoid excessive runtime.growslice()

* go1.20 compat

* update go.mod/sum

* Update CHANGELOG.md

* Revert "update go.mod/sum"

This reverts commit 1e4fcfa86c.

* inline slices.Grow as ensureAttributesCapacity

* fix comment

* add bench

* fix inlining

* Apply suggestions from code review

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

* add ReportAllocs

* add benchmark variations with lower limit

* bugfix: we always want to set cap, just the value is a min()

* lint

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2024-01-12 13:42:36 -08:00
CZ
7fa7d1b252
sdk/metric: Fix observable not registered error when the asynchronous instrument has a drop aggregation (#4772)
* Fix observable instrument not registered on drop aggregation

* Add TestObservableDropAggregation

* Add testcase for dropping unregistered observable

* Update CHANGELOG

* Add observable name const + suggestions

* Add suggestions

* Only error if the instrument is not dropped

* Decrease indentation

* Revert "Decrease indentation"

This reverts commit 9e7e7729bf.

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2024-01-11 15:27:40 -08:00
Robert Pająk
01472db75f
Upgrade use of semconv to v1.24.0 (#4754) 2024-01-11 12:56:07 +01: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
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
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
8e756513a6
sdk/metric: Record measurements when context is done (#4671) 2023-12-15 19:14:16 +01: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
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
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
David Ashpole
204be6157f
Fix data race in periodic reader tests (#4731) 2023-11-28 11:12:11 +01:00
Robert Pająk
98b32a6c3a
Release 1.21.0/0.44.0 (#4724) 2023-11-16 21:11:06 +01:00
Robert Pająk
85e4c467da
Release v1.20.0/v0.43.0 (#4705) 2023-11-10 17:42:33 +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
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
David Ashpole
b2bb2ad00f
Implement WithExplicitBucketBoundaries option in the metric SDK (#4605) 2023-10-31 08:41:27 +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
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
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
5b28921940
[chore] Add gosec via golangci-lint (#4645) 2023-10-19 08:47:07 +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
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
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
OpenTelemetry Bot
1c2fbf50df
dependabot updates Mon Oct 9 08:29:23 UTC 2023 (#4596)
Bump codespell from 2.2.5 to 2.2.6
Bump golang.org/x/sys from 0.12.0 to 0.13.0 in /sdk
Bump stefanzweifel/git-auto-commit-action from 4 to 5
Bump github.com/jcchavezs/porto from 0.4.0 to 0.5.1 in /internal/tools
Bump golang.org/x/tools from 0.13.0 to 0.14.0 in /internal/tools
Bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0 in /exporters/prometheus
2023-10-09 10:44:40 +02:00
Tyler Yahn
60666c5540
Release v1.19.0/v0.42.0/v0.0.7 (#4568)
* Bump versions

* Prepare stable-v1 for version v1.19.0

* Prepare experimental-metrics for version v0.42.0

* Prepare experimental-schema for version v0.0.7

* Update changelog
2023-09-28 12:28:51 -07:00
Charlie Le
612208d046
Fix typos in comments (#4553) 2023-09-26 10:05:53 +02:00
Robert Pająk
10b9f90fe4
sdk/metric: Update package example (#4540) 2023-09-22 08:04:06 +02:00
Robert Pająk
bf54101e32
Fix comment in ExampleNewView_attributeFilter (#4529)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-09-19 07:38:39 -07:00
Robert Pająk
4738218c03
sdk/metric: Refine NewView wildcard comment (#4530) 2023-09-19 07:30:26 -07:00
Robert Pająk
be43b929aa
Add ExampleNewView_attributeFilter and refine ExampleNewView_drop (#4527) 2023-09-19 08:06:11 +02:00
Robert Pająk
a5190f632f
Add Base2ExponentialHistogram example (#4518) 2023-09-18 10:05:33 +02:00
Tyler Yahn
2ee71fdd4e
Release v1.19.0-rc.1/v0.42.0-rc.1 (#4510)
* Bump versions.yaml

Move go.opentelemetry.io/otel/sdk/metric to stable-v1.

* Prepare stable-v1 for version v1.19.0-rc.1

* Prepare experimental-metrics for version v0.42.0-rc.1

* Update changelog
2023-09-14 12:57:45 -07:00
Robert Pająk
e3d6c8eec2
Add and refine metrics examples (#4504) 2023-09-14 08:17:20 +02:00
Aaron Abbott
bcbee2ac1a
Allow '/' character in instrument names (#4501)
* Allow '/' character in instrument names

* Add changelog

* Update CHANGELOG.md

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

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-09-13 09:01:34 -07:00
Tyler Yahn
4242228103
Release v1.18.0/v0.41.0/v0.0.6 (#4489)
* Bump versions

* Prepare stable-v1 for version v1.18.0

* Prepare experimental-metrics for version v0.41.0

* Prepare experimental-schema for version v0.0.6

* Update changelog

* Update CHANGELOG.md

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-09-12 07:54:37 -07:00
Damien Mathieu
ac4fca2260
Use a TB interface in metricdatatest (#4483)
* use testing.TB interface in metricdatatest

* add changelog entry

* use our own TB interface

* Update CHANGELOG.md

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

* rename TB to TestingT

* SIG meeting feedback

* ensure *testing.T implements TestingT

* Update sdk/metric/metricdata/metricdatatest/assertion.go

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

* change formatting for last testing.TB too

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-11 07:26:21 -07:00
Tyler Yahn
9737995cdb
Drop support for Go 1.19 (#4481)
* Drop support for Go 1.19

* Add change to changelog

* Bump all modules to 1.20

* Update exponential_histogram_test.go

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-07 12:18:29 -05:00
Tyler Yahn
76c370f1b1
Document public metric SDK interfaces to remain stable (#4396)
* Document public ifaces to remain stable

Resolve #3673

* Revert changes to aggregation pkg

* Document reader as an interface that can be extended

* Address feedback

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-09-06 13:55:56 -07:00
Rangel Reale
fc70923e53
Ignore value option for metricdatatest (#4447) 2023-09-05 19:00:06 +02:00
OpenTelemetry Bot
b17ad41a00
dependabot updates Tue Sep 5 06:35:43 UTC 2023 (#4477)
Bump golang.org/x/sys from 0.11.0 to 0.12.0 in /sdk
2023-09-05 09:04:55 +02:00
Tyler Yahn
d702e92c2b
Remove the deprecated sdk/metric/aggregation package (#4468)
* Remove the deprecated sdk/metric/aggregation package

* Update PR number
2023-08-29 13:19:33 -07:00
Tyler Yahn
3c476ce181
Release v1.17.0/v0.40.0/v0.0.5 (#4464)
* Bump versions.yaml

* Prepare stable-v1 for version v1.17.0

* Prepare experimental-metrics for version v0.40.0

* Prepare experimental-schema for version v0.0.5

* Update changelog

* Update changelog release header
2023-08-28 07:50:03 -07:00
Tyler Yahn
69611bd01a
Switch Stream back to having an AttributeFilter field and add New*Filter functions (#4444)
* Add allow/deny attr filters

* Revert "Replace `Stream.AttributeFilter` with `AllowAttributeKeys` (#4288)"

This reverts commit 1633c74aea.

* Rename new attr filter funcs

Do not include the term "Attribute" in a creation function of the
"attribute" pkg.

* Update the AttributeFilter field documentation

* Add tests for filter creation funcs

* Add change to changelog

* Apply feedback

* Use NewDenyKeysFilter for allow-all and deny-list filters

* Remove links from field docs

These links do not render.

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-08-25 07:39:43 -07:00
Umut Tezduyar Lindskog
f15ae160c4
Fix the broken sentence (#4456)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-08-18 07:24:32 -07:00