Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

pellared
Copy link
Member

@pellared pellared commented Jun 3, 2025

Fixes #6863

From https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Resource:

Resource is an immutable object
[...]
Resources should be passed and stored as pointers (*resource.Resource)

In all other places the exported API uses *resource.Resource and not resource.Resource.

@codecov
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.3%. Comparing base (1636bcd) to head (d4f55f5).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6864   +/-   ##
=====================================
  Coverage   82.3%   82.3%           
=====================================
  Files        263     263           
  Lines      24421   24418    -3     
=====================================
- Hits       20102   20100    -2     
+ Misses      3937    3936    -1     
  Partials     382     382           
Files with missing lines Coverage Δ
exporters/stdout/stdoutlog/record.go 97.4% <100.0%> (ø)
sdk/log/record.go 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pellared pellared marked this pull request as ready for review June 3, 2025 10:17
@pellared pellared added pkg:SDK Related to an SDK package area:logs Part of OpenTelemetry logs labels Jun 3, 2025
@pellared pellared moved this from Todo to In Progress in Go: Logs (GA) Jun 3, 2025
@pellared pellared self-assigned this Jun 3, 2025
@pellared pellared merged commit a99f9b5 into open-telemetry:main Jun 4, 2025
35 of 36 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go: Logs (GA) Jun 4, 2025
@MrAlias MrAlias added this to the v1.37.0 milestone Jun 18, 2025
pellared added a commit that referenced this pull request Jun 25, 2025
### Added

- The `go.opentelemetry.io/otel/semconv/v1.33.0` package.
The package contains semantic conventions from the `v1.33.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799)
- The `go.opentelemetry.io/otel/semconv/v1.34.0` package.
The package contains semantic conventions from the `v1.34.0` version of
the OpenTelemetry Semantic Conventions. (#6812)
- Add metric's schema URL as `otel_scope_schema_url` label in
`go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
- Add metric's scope attributes as `otel_scope_[attribute]` labels in
`go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
- Add `EventName` to `EnabledParameters` in
`go.opentelemetry.io/otel/log`. (#6825)
- Add `EventName` to `EnabledParameters` in
`go.opentelemetry.io/otel/sdk/log`. (#6825)
- Changed handling of `go.opentelemetry.io/otel/exporters/prometheus`
metric renaming to add unit suffixes when it doesn't match one of the
pre-defined values in the unit suffix map. (#6839)

### Changed

- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/bridge/opentracing`. (#6827)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#6829)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/metric`. (#6832)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/sdk/resource`. (#6834)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/sdk/trace`. (#6835)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/trace`. (#6836)
- `Record.Resource` now returns `*resource.Resource` instead of
`resource.Resource` in `go.opentelemetry.io/otel/sdk/log`. (#6864)
- Retry now shows error cause for context timeout in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6898)

### Fixed

- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#6710)
- Validate exponential histogram scale range for Prometheus
compatibility in `go.opentelemetry.io/otel/exporters/prometheus`.
(#6822)
- Context cancellation during metric pipeline produce does not corrupt
data in `go.opentelemetry.io/otel/sdk/metric`. (#6914)

### Removed

- `go.opentelemetry.io/otel/exporters/prometheus` no longer exports
`otel_scope_info` metric. (#6770)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:logs Part of OpenTelemetry logs pkg:SDK Related to an SDK package

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

In "go.opentelemetry.io/otel/sdk/log" module, the record.Resource should return a pointer *resource.Resource type

4 participants