fix: OpenTelemetry schema URL panic#2012
Conversation
| if schemaURL == "" { | ||
| schemaURL = semconv.SchemaURL | ||
| } | ||
| r, err := resource.Merge( |
There was a problem hiding this comment.
This method always returns r (even with err, which the single value can be ErrSchemaURLConflict) so we could also do if r != nil { return r } panic(err) but in that case the resource's schema URL could be empty.
|
Is there a reproduction for the panic? Based on the panic stack: The issue is from an old SDK version (introduced in https://github.com/cloudquery/plugin-sdk/pull/1634/files) and fixed via https://github.com/cloudquery/plugin-sdk/pull/1605/files and https://github.com/cloudquery/plugin-sdk/pull/1607/files |
|
OK something doesn't add up as |
erezrokah
left a comment
There was a problem hiding this comment.
OK let's go with this fix though not sure how the mismatch can happen, probably related to the logic in https://github.com/open-telemetry/opentelemetry-go/blob/82c57cb8dd23ab537e60fbd1625bbb88b163f222/sdk/resource/resource.go#L230
🤖 I have created a release *beep* *boop* --- ## [4.72.1](v4.72.0...v4.72.1) (2024-12-19) ### Bug Fixes * **deps:** Update aws-sdk-go-v2 monorepo ([#2007](#2007)) ([7f3818d](7f3818d)) * **deps:** Update module github.com/cloudquery/cloudquery-api-go to v1.13.5 ([#2015](#2015)) ([9b6e9f2](9b6e9f2)) * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.26.1 ([#2010](#2010)) ([b12dc10](b12dc10)) * **deps:** Update module golang.org/x/net to v0.33.0 [SECURITY] ([#2014](#2014)) ([7360bd2](7360bd2)) * **deps:** Update module google.golang.org/grpc to v1.69.0 ([#2008](#2008)) ([aae018f](aae018f)) * OpenTelemetry schema URL panic ([#2012](#2012)) ([b616279](b616279)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
resource.Mergereturns an error only when schemas don't match.