Skip to content

Go OTEL version 1.39.0 -> 1.40.0 includes non backward compatible change #7912

@bushnell-deshaw

Description

@bushnell-deshaw

Description

Go version 1.40.0 of the otel module included this change: 61f0e48.

This is a non-backward-compatible change. Correct code which used to work breaks after this change. Suppose you have a module top which imports otel at 1.39.0 and uses module 3party which directly imports the semconv/v1.37.0 package. top works fine because otel@1.39.0 also imports semconv/v1.37.0.

Now you upgrade top to otel@1.40.0, which imports semconv/v1.39.0. But now top stops working because when you attempt to register resources, otel detects that some of them are using schema "1.37.0" and some are using schema "1.39.0", and the merge can be attempted but is not guaranteed to succeed.

This violates the semantic versioning rules for Go and therefore requires a major version flip for otel.

I understand this is a difficult problem to solve given the way semconv is handling schemas, but it is very harmful to address it by pushing breaking changes under minor releases. If it is not possible to functionally use different semconv/vn.n.n modules in the same program without risk of an error arising, then any change of an import to a different semconv module may be a backwards-incompatible change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions