This release includes the first beta release of the OpenTelemetry Logs
Bridge API and SDK for Go.
### Added
- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.
(#5242)
- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to
facilitate testing exporter and processor implementations. (#5258)
- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to
facilitate testing bridge implementations. (#5263)
- The count of dropped records from the `BatchProcessor` in
`go.opentelemetry.io/otel/sdk/log` is logged. (#5276)
- Add metrics in the `otel-collector` example. (#5283)
- Add the synchronous gauge instrument to
`go.opentelemetry.io/otel/metric`. (#5304)
- An `int64` or `float64` synchronous gauge instrument can now be
created from a `Meter`.
- All implementations of the API
(`go.opentelemetry.io/otel/metric/noop`,
`go.opentelemetry.io/otel/sdk/metric`) are updated to support this
instrument.
- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349)
### Changed
- The `Shutdown` method of `Exporter` in
`go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the
context cancellation and always returns `nil`. (#5189)
- The `ForceFlush` and `Shutdown` methods of the exporter returned by
`New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore
the context cancellation and always return `nil`. (#5189)
- Apply the value length limits to `Record` attributes in
`go.opentelemetry.io/otel/sdk/log`. (#5230)
- De-duplicate map attributes added to a `Record` in
`go.opentelemetry.io/otel/sdk/log`. (#5230)
- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print
timestamps when `WithoutTimestamps` option is set. (#5241)
- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter
won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields
now, instead it prints the `DroppedAttributes` field. (#5272)
- Improved performance in the `Stringer` implementation of
`go.opentelemetry.io/otel/baggage.Member` by reducing the number of
allocations. (#5286)
- Set the start time for last-value aggregates in
`go.opentelemetry.io/otel/sdk/metric`. (#5305)
- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links
without span context if either non-empty `TraceState` or attributes are
provided. (#5315)
- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0`
to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374)
### Fixed
- Comparison of unordered maps for
`go.opentelemetry.io/otel/log.KeyValue` and
`go.opentelemetry.io/otel/log.Value`. (#5306)
- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in
`go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311)
- Split the behavior of `Recorder` in
`go.opentelemetry.io/otel/log/logtest` so it behaves as a
`LoggerProvider` only. (#5365)
- Fix wrong package name of the error message when parsing endpoint URL
in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
(#5371)
- Identify the `Logger` returned from the global `LoggerProvider` in
`go.opentelemetry.io/otel/log/global` with its schema URL. (#5375)
The current logtest.Recorder implementation is wrong. We have a single
`Recorder`, which acts as both a `LoggerProvider`, and a `Logger`,
making it possible to emit a log entry with the root recorder, which
shouldn't be possible with the API.
This change introduces a new private struct, `logger` that acts as the
recording logger, while `Recorder` becomes only a LoggerProvider and not
a Logger anymore.
Closes#5357.
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.26.0
* Prepare experimental-metrics for version v0.48.0
* Prepare experimental-logs for version v0.2.0-alpha
* Prepare experimental-schema for version v0.0.9
* Update CHANGELOG
* Unbump experimental-schema
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* introduce in-memory log exporter
* add changelog entry
* move logtest into a recorder within the api
* rename GetRecords to Result
* rename InMemoryRecorder to Recorder
* name the struct r
* ensure Logger creates a struct copy
* replace severity with enabledFn
* Update CHANGELOG.md
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* kUpdate log/logtest/config.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* store all scope records, so we can retrieve everything with `Result()`
* store child loggers instead of all scope records
* no need to explicitly create a new slice
* add concurrent safe test
* handle default enabled function if the struct was manually created
* rename WithEnabledFn to WithEnabledFunc
* test result/reset with child loggers
* add enabled to concurrent safe
* fix lint missing period
* rename defaultEnabledFn to defaultEnabledFunc
* merge recorder.go and config.go
* Update log/logtest/recorder_test.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* create empty recorder in concurrent safe test
* Update log/logtest/recorder_test.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* fix lint
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update log/logtest/recorder.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* make enabledFunc callable from outside the package
* replace expected with want
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
* Bump versions in versions.yaml
* Prepare stable-v1 for version v1.25.0
* Prepare experimental-metrics for version v0.47.0
* Prepare experimental-logs for version v0.1.0-alpha
* Prepare experimental-schema for version v0.0.8
* Update changelog
* Run go mod tidy
* Update CHANGELOG.md
---------
Co-authored-by: Damien Mathieu <damien.mathieu@elastic.co>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Add the Enabled method to the Logger
* Add a changelog entry
* Rename enabled.go to min_sev.go
* Remove MinSeverityProcessor
* Document lack of interaction between OnEmit and Enabled
* Update sdk/log/processor.go
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /sdk/metric
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/otlp/otlptrace/otlptracegrpc
build(deps): bump codecov/codecov-action from 3.1.5 to 4.1.0
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/zipkin
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /metric
build(deps): bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0 in /example/prometheus
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/stdout/stdouttrace
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/otlp/otlptrace/otlptracehttp
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/otlp/otlptrace
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /trace
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/stdout/stdoutmetric
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /bridge/opentracing
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /schema
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /log
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /sdk
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /bridge/opencensus
build(deps): bump go.opentelemetry.io/build-tools/gotmpl from 0.12.0 to 0.13.0 in /internal/tools
build(deps): bump go.opentelemetry.io/build-tools/multimod from 0.12.0 to 0.13.0 in /internal/tools
build(deps): bump go.opentelemetry.io/build-tools/dbotconf from 0.12.0 to 0.13.0 in /internal/tools
build(deps): bump go.opentelemetry.io/build-tools/semconvgen from 0.12.0 to 0.13.0 in /internal/tools
build(deps): bump go.opentelemetry.io/build-tools/crosslink from 0.12.0 to 0.13.0 in /internal/tools
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /bridge/opentracing/test
build(deps): bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0 in /exporters/prometheus
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /exporters/prometheus
* Update README.md
* Remove 1.20 support from CI workflows
* Update all go mod
* Add changelog entry
* Update go mod tidy target
* Run go mod tidy
* Replace sliceEqualFunc with slices.EqualFunc
* Replace grow with slices.Grow
* Replace ensureAttributesCapacity with slices.Grow
* Replace conditional with min
* Use slices module for slice comparison in metricdatatest
* Export getLogger
Refactor the declaration of globalLogger to incorporate the logic of
init() so there is no data race between GetLogger and init being called.
* Use GetLogger in log testing
* Restore logger in batch span processor testing
* Remove unused URL in globalLogger doc
* Bump versions
* Prepare stable-v1 for version v1.24.0
* Prepare experimental-metrics for version v0.46.0
* Prepare experimental-logs for version v0.0.1-alpha
* Update changelog
* Fix changelog entry