Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Sep 23, 2025

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.

This PR contains the following updates:

Package Change Age Confidence
github.com/prometheus/otlptranslator v0.0.2 -> v1.0.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

⚠️ MAJOR VERSION UPDATE ⚠️ - please manually update this package


Release Notes

prometheus/otlptranslator (github.com/prometheus/otlptranslator)

v1.0.0

Compare Source

⚠️ Breaking changes ⚠️
  • Label names that start with a single Underscore (_) character are no longer prefixed with the word key during translation. Folks who depend on such behavior can re-enable it by setting LabelNamer.UnderscoreLabelSanitization = true. #​55
  • Labels that have multiple underscores in sequence are now deduplicated if UTF-8 isn't allowed. Folks who depend on such behavior can re-enable it by setting LabelNamer.PreserveMultipleUnderscores = true. Be aware that if UTF8Allowed is set to true, multiple underscores are preserved even if PreserveMultipleUnderscores == false. #​58
Bug fixes
  • Error is returned if the result of a translation is a string consisting of underscores only. #​56
Performance
  • Remove usage of regexp. #​59

Full Changelog: prometheus/otlptranslator@v0.0.2...v1.0.0


Configuration

📅 Schedule: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependency-major-update Indicates a dependency major version bump label Sep 23, 2025
@songy23 songy23 marked this pull request as draft September 23, 2025 19:32
@renovate renovate bot changed the title fix(deps): update module github.com/prometheus/otlptranslator to v1 Update module github.com/prometheus/otlptranslator to v1 Sep 25, 2025
@renovate renovate bot changed the title Update module github.com/prometheus/otlptranslator to v1 fix(deps): update module github.com/prometheus/otlptranslator to v1 Sep 25, 2025
@ywwg
Copy link
Contributor

ywwg commented Sep 25, 2025

looking at this now

@renovate renovate bot changed the title fix(deps): update module github.com/prometheus/otlptranslator to v1 Update module github.com/prometheus/otlptranslator to v1 Sep 25, 2025
@ywwg
Copy link
Contributor

ywwg commented Sep 26, 2025

I can't figure out what's failing so I can't really fix this

@dashpole
Copy link
Contributor

I found:

=== Failed
=== FAIL: . Test_createLabelSet/labels_dirty (0.00s)
    helper_test.go:380: 
        	Error Trace:	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite/helper_test.go:380
        	Error:      	elements differ
        	            	
        	            	extra elements in list A:
        	            	([]interface {}) (len=1) {
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=16) "key_test_label12",
        	            	  Value: (string) (len=12) "test_value12",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 }
        	            	}
        	            	
        	            	
        	            	extra elements in list B:
        	            	([]interface {}) (len=1) {
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "_test_label12",
        	            	  Value: (string) (len=12) "test_value12",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 }
        	            	}
        	            	
        	            	
        	            	listA:
        	            	([]prompb.Label) (len=4) {
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "test_label11_",
        	            	  Value: (string) (len=12) "test_value11",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=16) "key_test_label12",
        	            	  Value: (string) (len=12) "test_value12",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "test_label31_",
        	            	  Value: (string) (len=12) "test_value31",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=12) "test_label32",
        	            	  Value: (string) (len=12) "test_value32",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 }
        	            	}
        	            	
        	            	
        	            	listB:
        	            	([]prompb.Label) (len=4) {
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "test_label11_",
        	            	  Value: (string) (len=12) "test_value11",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "test_label31_",
        	            	  Value: (string) (len=12) "test_value31",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
make[2]: *** [../../../Makefile.Common:107: test] Error 1
make[1]: *** [Makefile:254: pkg/translator/prometheusremotewrite] Error 2
make: *** [Makefile:175: gotest] Error 2
        	            	  Name: (string) (len=12) "test_label32",
        	            	  Value: (string) (len=12) "test_value32",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 },
        	            	 (prompb.Label) {
        	            	  Name: (string) (len=13) "_test_label12",
        	            	  Value: (string) (len=12) "test_value12",
        	            	  XXX_NoUnkeyedLiteral: (struct {}) {
        	            	  },
        	            	  XXX_unrecognized: ([]uint8) <nil>,
        	            	  XXX_sizecache: (int32) 0
        	            	 }
        	            	}
        	Test:       	Test_createLabelSet/labels_dirty

@ywwg
Copy link
Contributor

ywwg commented Sep 26, 2025

would love to know how you tracked that down! I couldn't even find a readable log entry in the CI

@songy23 songy23 merged commit c3860d6 into main Sep 29, 2025
206 of 207 checks passed
@songy23 songy23 deleted the renovate/github.com-prometheus-otlptranslator-1.x branch September 29, 2025 17:25
@github-actions github-actions bot added this to the next release milestone Sep 29, 2025
@ywwg
Copy link
Contributor

ywwg commented Sep 29, 2025

As a followup to this update, which for some users is a breaking change for metric names, I am creating this PR which exposes options necessary to restore the old (now deprecated) behavior: #43050

@ywwg
Copy link
Contributor

ywwg commented Sep 29, 2025

hmmm, there will need to be more work done to prevent bad experiences for users upgrading to this version. We may want to roll this back util we've added the config options necessary

@ArthurSens
Copy link
Member

@ywwg could you raise the PR reverting it?

@ywwg
Copy link
Contributor

ywwg commented Sep 30, 2025

Based on our discussion, this upgrade does need to stay here first so that the options can be added. So no revert

@ArthurSens
Copy link
Member

The problem is that we are not confident that just the upgrade won't break anybody, and discussions need to happen to understand how to integrate the new otlptranslator code with the existing feature gate 😬

I'm still voting to revert this PR, and we'll do the bump together with the changes needed to make the feature gate work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants