* Replace Stream AttributeFilter with AttributeKeys
* Rename Stream field AttributeKeys to AllowAttributeKeys
Ensure forward compatibility if a deny-list of attribute keys is ever
added.
* Add change to changelog
* Update PR number in changelog
* Update CHANGELOG.md
Co-authored-by: Damien Mathieu <42@dmathieu.com>
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Concurrent collect bugfix
* Used sync.Mutex and code cleanup
* Revert "Concurrent collect bugfix"
This reverts commit 1a30f233b6.
* Used sync.Mutex and re-grouped protected members
* Added test and updated changelog
* Updated changelog
* Take care of potential panic in otel.Handle
* Extracted critical section in a separate method and fixed nil scope info
* Lock the whole scope of the func
* Moved otel.Handle out of the critical section
* Fixed calling createScopeInfoMetric twice and updated changelog
* Fixed markdown linter errors
* Added test for nil scopeinfo
* Fix merge artifacts
* Fixed linter errors
* Protect the whole validateMetrics method wity mutex
* Update CHANGELOG.md
* Update exporters/prometheus/exporter.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Update CHANGELOG.md
* Document that Collect is concurrent-safe
* Update exporter_test.go
* Update exporters/prometheus/exporter_test.go
* Update exporters/prometheus/exporter.go
Co-authored-by: David Ashpole <dashpole@google.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: David Ashpole <dashpole@google.com>
* Format log message before logging with logr
Fixes#4141
The logr calling convention does not support fmt semantics for message
formatting. Format the message before it is sent to logr for logging.
* Add change to changelog
* Fix lint
Don't shadow the log pkg.
* Replace buflogr with funcr
* Run make
* Update exporters/zipkin/zipkin_test.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* validate instrument names when creating them
* add changelog entry
* remove now invalid instrument name from prometheus test
* fix invalid names in meter_test
* keep returning the instrument even if its name is invalid
* make invalid instrument name a known error
* bring back prometheus invalid instrument name test
* remove warning
* fix lint
* move name validation into the lookup method
* fix lint again
* Revert "move name validation into the lookup method"
This reverts commit ec8ccc5fa0.
* rename ErrInvalidInstrumentName to ErrInstrumentName
* switch to explicit validations, instead of a regexp
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* remove double check for empty name
* test validation shortcut with a single character
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Add semconv/v1.19.0
Includes adding semconv/internal/v3/ to support the move of
the semantic convention HTTPUserAgentKey to the new key
UserAgentOriginalKey
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* format http.go.tmpl using tabs instead of spaces
* update http.go.tmpl to use v3 of semconv/internal
* Generate attribute_group.go
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Revert "Move global metric back to `otel/metric/global` for minor release (#3986)"
This reverts commit 8dba38e02f.
* Add changes to changelog
* Fix versions and go mod tidy
* Run go-mod-tidy
* Bump versions
* Prepare stable-v1 for version v1.15.0
* Prepare experimental-metrics for version v0.38.0
* Fix otlpmetric tests
Check pre 1.0 as well
* Update the chagelog
* Added methods for SpanID and TraceID on bridgeSpanContext
* changed test name
* Added entry in changelog, updated readme, added comments on methods and fixed test case
* updated CHANGELOG.md
* promoted all methods from SpanContext to bridgeSpanContext
* fixed readme and removed redudant IsSampled() from bridgeContext
* fixed readme lint
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* addressed code review comment
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Revert "Remove the deprecated `otel/metric/global` pkg (#3829)"
This reverts commit 60f7d42d1e.
* Revert "Support a global MeterProvider in `go.opentelemetry.io/otel` (#3818)"
This reverts commit 813936187e.
* Remove top level metric global
* Add change to changelog
* docs(typos): Run codespell to fix typos
There were a lot of typos through the repository, so I ran
[codespell][], a tool for automatically fixing typos, to fix them.
```console
make codespell
```
There's already a tool called [misspell][] that's supposed to take care
of this, but misspell hasn't been updated for 6 years, and it doesn't
seem to be catching any of the typos that codespell can.
[codespell]: https://github.com/codespell-project/codespell
[misspell]: https://github.com/client9/misspell
* Revert and ignore spelling for Consequentially
* Add GH workflow for codespell
* Revert GH Workflow and Makefile for codespell
Per @pellared, since there's no instructions for setting up codespell,
it was suggested that the changes for setting up a workflow and section
in Makefile include instructions for setting up codespell as well.
* Revert spelling on consequently
---------
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* fix aggregation.Default to properly return the default one
* add changelog entry
* default aggregation does not error anymore
* test all instrument kinds
* PoC of embedded private method ifaces
* Rename embed to embedded
* Add an embedded iface for all instruments
* Fix metric/instrument tests
* Fix global and otel
* Fix SDK
* Comment the embedded pkg types
* Update the embedded pkg docs
* Update otel/metric docs about impls
* Update otel/metric type docs on impl
* Update docs in otel/metric/instrument on default
* Add changes to changelog
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Apply feedback on URLs
* Reword based on feedback
* Make it clear we only recommended embedding noop
* Ignore links with godot linter
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Add Version func to otel/sdk
* Update sdk/resource to use sdk version
* Remove unused UserAgent from sdk/internal
* Add changes to changelog
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* add warning log about using simpleSpanProcessor in production
* add changelog entry
* fix changelog
* switch to using the new Warn logging function
* revert alignment formatting in changelog
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Bump versions
* Prepare stable-v1 for version v1.15.0-rc.2
* Prepare experimental-metrics for version v0.38.0-rc.2
* Update changelog
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* add platform specific hostIDReaders
* add WithHostID option to Resource
* add changelog entry
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* linting
* combine platform specific readers and tests
This allows us to run tests for the BSD, Darwin, and Linux readers
on all platforms.
* add todo to use assert.AnError after resource.Detect error handling is updated
* move HostID test utilities to host_id_test
* return assert.AnError from mockHostIDProviderWithError
* use assert.ErrorIs
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Introduce `Warn` function in global package
* Cover log levels with tests
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
* Move metric No-Op to noop pkg
* Remove the unneeded embedded ifaces
* Update CHANGELOG.md
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
---------
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>