-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: add HumanizeTimestamp; make ConvertToFloat exportable #654
Refactor: add HumanizeTimestamp; make ConvertToFloat exportable #654
Conversation
Signed-off-by: Sergey <freak12techno@gmail.com>
@machine424 since you reviewed the previous PR on Prometheus repo, maybe you can take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review, generally it looks good already!
I'm just making a suggestion to reduce a few lines of code in tests
Signed-off-by: Sergey <freak12techno@gmail.com>
Signed-off-by: Sergey <freak12techno@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait a bit for josh to review because I don't know how Alertmanager plans to use this (again due to my lack of context 😅)
But if it takes too long I'll just merge it, no big deal exporting FloatToTime :)
helpers/templates/time_test.go
Outdated
func TestHumanizeTimestampSampleFloat64(t *testing.T) { | ||
result, err := HumanizeTimestamp(1435065584.128) | ||
require.NoError(t, err) | ||
require.Equal(t, "2015-06-23 13:19:44.128 +0000 UTC", result) | ||
} | ||
|
||
func TestHumanizeTimestampSampleString(t *testing.T) { | ||
result, err := HumanizeTimestamp(1435065584.128) | ||
require.NoError(t, err) | ||
require.Equal(t, "2015-06-23 13:19:44.128 +0000 UTC", result) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be a single test, but that's just nitpicking :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually yeah, can fix right away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also done, should be better now. Thanks for suggesting!
Also found a bug in one of these tests (float64 instead of string), fixed it there as well
Signed-off-by: Sergey <freak12techno@gmail.com>
You can merge without me @ArthurSens - if this looks go to you, go right ahead. |
@gotjosh @ArthurSens can either of you bump a version? I'd like to make another PR on Prometheus repo utilizing this and it needs a new version. Also, appreciate the review. |
Sure :) Let me ping a few people and see if I can proceed with a release! |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.54.0` -> `v0.55.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.55.0`](https://togithub.com/prometheus/common/releases/tag/v0.55.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.54.0...v0.55.0) #### What's Changed - Update Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/643](https://togithub.com/prometheus/common/pull/643) - enable errcheck linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/637](https://togithub.com/prometheus/common/pull/637) - Add a `RELEASE.md` and add [@​gotjosh](https://togithub.com/gotjosh) as a mantainer by [@​gotjosh](https://togithub.com/gotjosh) in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - Move goautoneg to external dependency by [@​mikelolasagasti](https://togithub.com/mikelolasagasti) in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - Expose secret as SecretReader and InlineSecret from config package by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/650](https://togithub.com/prometheus/common/pull/650) - Fix HTTPClientConfig JSON marshalling by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/651](https://togithub.com/prometheus/common/pull/651) - Expose secret as FileSecret from config package by [@​alanprot](https://togithub.com/alanprot) in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/646](https://togithub.com/prometheus/common/pull/646) - Set http_headers to be omit empty by [@​yeya24](https://togithub.com/yeya24) in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - chore: add HumanizeTimestamp; make ConvertToFloat exportable by [@​freak12techno](https://togithub.com/freak12techno) in [https://github.com/prometheus/common/pull/654](https://togithub.com/prometheus/common/pull/654) - Bump github.com/aws/aws-sdk-go from 1.53.14 to 1.54.7 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/659](https://togithub.com/prometheus/common/pull/659) - Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/656](https://togithub.com/prometheus/common/pull/656) - Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/658](https://togithub.com/prometheus/common/pull/658) - Bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/657](https://togithub.com/prometheus/common/pull/657) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/660](https://togithub.com/prometheus/common/pull/660) - Add SigV4 FIPS STS endpoint config by [@​rajagopalanand](https://togithub.com/rajagopalanand) in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) #### New Contributors - [@​gotjosh](https://togithub.com/gotjosh) made their first contribution in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - [@​mikelolasagasti](https://togithub.com/mikelolasagasti) made their first contribution in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - [@​alanprot](https://togithub.com/alanprot) made their first contribution in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - [@​yeya24](https://togithub.com/yeya24) made their first contribution in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - [@​rajagopalanand](https://togithub.com/rajagopalanand) made their first contribution in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) **Full Changelog**: prometheus/common@v0.54.0...v0.55.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jaegertracing/jaeger). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJjaGFuZ2Vsb2c6ZGVwZW5kZW5jaWVzIl19--> --------- Signed-off-by: Mend Renovate <bot@renovateapp.com> Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Yuri Shkuro <github@ysh.us>
…5806) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.54.0` -> `v0.55.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.55.0`](https://togithub.com/prometheus/common/releases/tag/v0.55.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.54.0...v0.55.0) #### What's Changed - Update Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/643](https://togithub.com/prometheus/common/pull/643) - enable errcheck linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/637](https://togithub.com/prometheus/common/pull/637) - Add a `RELEASE.md` and add [@​gotjosh](https://togithub.com/gotjosh) as a mantainer by [@​gotjosh](https://togithub.com/gotjosh) in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - Move goautoneg to external dependency by [@​mikelolasagasti](https://togithub.com/mikelolasagasti) in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - Expose secret as SecretReader and InlineSecret from config package by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/650](https://togithub.com/prometheus/common/pull/650) - Fix HTTPClientConfig JSON marshalling by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/651](https://togithub.com/prometheus/common/pull/651) - Expose secret as FileSecret from config package by [@​alanprot](https://togithub.com/alanprot) in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/646](https://togithub.com/prometheus/common/pull/646) - Set http_headers to be omit empty by [@​yeya24](https://togithub.com/yeya24) in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - chore: add HumanizeTimestamp; make ConvertToFloat exportable by [@​freak12techno](https://togithub.com/freak12techno) in [https://github.com/prometheus/common/pull/654](https://togithub.com/prometheus/common/pull/654) - Bump github.com/aws/aws-sdk-go from 1.53.14 to 1.54.7 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/659](https://togithub.com/prometheus/common/pull/659) - Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/656](https://togithub.com/prometheus/common/pull/656) - Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/658](https://togithub.com/prometheus/common/pull/658) - Bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/657](https://togithub.com/prometheus/common/pull/657) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/660](https://togithub.com/prometheus/common/pull/660) - Add SigV4 FIPS STS endpoint config by [@​rajagopalanand](https://togithub.com/rajagopalanand) in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) #### New Contributors - [@​gotjosh](https://togithub.com/gotjosh) made their first contribution in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - [@​mikelolasagasti](https://togithub.com/mikelolasagasti) made their first contribution in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - [@​alanprot](https://togithub.com/alanprot) made their first contribution in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - [@​yeya24](https://togithub.com/yeya24) made their first contribution in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - [@​rajagopalanand](https://togithub.com/rajagopalanand) made their first contribution in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) **Full Changelog**: prometheus/common@v0.54.0...v0.55.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…5552) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.54.0` -> `v0.55.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.55.0`](https://togithub.com/prometheus/common/releases/tag/v0.55.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.54.0...v0.55.0) #### What's Changed - Update Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/643](https://togithub.com/prometheus/common/pull/643) - enable errcheck linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/637](https://togithub.com/prometheus/common/pull/637) - Add a `RELEASE.md` and add [@​gotjosh](https://togithub.com/gotjosh) as a mantainer by [@​gotjosh](https://togithub.com/gotjosh) in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - Move goautoneg to external dependency by [@​mikelolasagasti](https://togithub.com/mikelolasagasti) in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - Expose secret as SecretReader and InlineSecret from config package by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/650](https://togithub.com/prometheus/common/pull/650) - Fix HTTPClientConfig JSON marshalling by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/651](https://togithub.com/prometheus/common/pull/651) - Expose secret as FileSecret from config package by [@​alanprot](https://togithub.com/alanprot) in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/646](https://togithub.com/prometheus/common/pull/646) - Set http_headers to be omit empty by [@​yeya24](https://togithub.com/yeya24) in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - chore: add HumanizeTimestamp; make ConvertToFloat exportable by [@​freak12techno](https://togithub.com/freak12techno) in [https://github.com/prometheus/common/pull/654](https://togithub.com/prometheus/common/pull/654) - Bump github.com/aws/aws-sdk-go from 1.53.14 to 1.54.7 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/659](https://togithub.com/prometheus/common/pull/659) - Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/656](https://togithub.com/prometheus/common/pull/656) - Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/658](https://togithub.com/prometheus/common/pull/658) - Bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/657](https://togithub.com/prometheus/common/pull/657) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/660](https://togithub.com/prometheus/common/pull/660) - Add SigV4 FIPS STS endpoint config by [@​rajagopalanand](https://togithub.com/rajagopalanand) in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) #### New Contributors - [@​gotjosh](https://togithub.com/gotjosh) made their first contribution in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - [@​mikelolasagasti](https://togithub.com/mikelolasagasti) made their first contribution in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - [@​alanprot](https://togithub.com/alanprot) made their first contribution in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - [@​yeya24](https://togithub.com/yeya24) made their first contribution in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - [@​rajagopalanand](https://togithub.com/rajagopalanand) made their first contribution in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) **Full Changelog**: prometheus/common@v0.54.0...v0.55.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.54.0` -> `v0.55.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.55.0`](https://togithub.com/prometheus/common/releases/tag/v0.55.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.54.0...v0.55.0) #### What's Changed - Update Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/643](https://togithub.com/prometheus/common/pull/643) - enable errcheck linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/637](https://togithub.com/prometheus/common/pull/637) - Add a `RELEASE.md` and add [@​gotjosh](https://togithub.com/gotjosh) as a mantainer by [@​gotjosh](https://togithub.com/gotjosh) in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - Move goautoneg to external dependency by [@​mikelolasagasti](https://togithub.com/mikelolasagasti) in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - Expose secret as SecretReader and InlineSecret from config package by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/650](https://togithub.com/prometheus/common/pull/650) - Fix HTTPClientConfig JSON marshalling by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/651](https://togithub.com/prometheus/common/pull/651) - Expose secret as FileSecret from config package by [@​alanprot](https://togithub.com/alanprot) in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/646](https://togithub.com/prometheus/common/pull/646) - Set http_headers to be omit empty by [@​yeya24](https://togithub.com/yeya24) in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - chore: add HumanizeTimestamp; make ConvertToFloat exportable by [@​freak12techno](https://togithub.com/freak12techno) in [https://github.com/prometheus/common/pull/654](https://togithub.com/prometheus/common/pull/654) - Bump github.com/aws/aws-sdk-go from 1.53.14 to 1.54.7 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/659](https://togithub.com/prometheus/common/pull/659) - Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/656](https://togithub.com/prometheus/common/pull/656) - Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/658](https://togithub.com/prometheus/common/pull/658) - Bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/657](https://togithub.com/prometheus/common/pull/657) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/660](https://togithub.com/prometheus/common/pull/660) - Add SigV4 FIPS STS endpoint config by [@​rajagopalanand](https://togithub.com/rajagopalanand) in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) #### New Contributors - [@​gotjosh](https://togithub.com/gotjosh) made their first contribution in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - [@​mikelolasagasti](https://togithub.com/mikelolasagasti) made their first contribution in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - [@​alanprot](https://togithub.com/alanprot) made their first contribution in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - [@​yeya24](https://togithub.com/yeya24) made their first contribution in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - [@​rajagopalanand](https://togithub.com/rajagopalanand) made their first contribution in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) **Full Changelog**: prometheus/common@v0.54.0...v0.55.0 </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://togithub.com/prometheus/common) | `v0.54.0` -> `v0.55.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.54.0/v0.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.55.0`](https://togithub.com/prometheus/common/releases/tag/v0.55.0) [Compare Source](https://togithub.com/prometheus/common/compare/v0.54.0...v0.55.0) ##### What's Changed - Update Go modules by [@​SuperQ](https://togithub.com/SuperQ) in [https://github.com/prometheus/common/pull/643](https://togithub.com/prometheus/common/pull/643) - enable errcheck linter by [@​mmorel-35](https://togithub.com/mmorel-35) in [https://github.com/prometheus/common/pull/637](https://togithub.com/prometheus/common/pull/637) - Add a `RELEASE.md` and add [@​gotjosh](https://togithub.com/gotjosh) as a mantainer by [@​gotjosh](https://togithub.com/gotjosh) in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - Move goautoneg to external dependency by [@​mikelolasagasti](https://togithub.com/mikelolasagasti) in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - Expose secret as SecretReader and InlineSecret from config package by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/650](https://togithub.com/prometheus/common/pull/650) - Fix HTTPClientConfig JSON marshalling by [@​pracucci](https://togithub.com/pracucci) in [https://github.com/prometheus/common/pull/651](https://togithub.com/prometheus/common/pull/651) - Expose secret as FileSecret from config package by [@​alanprot](https://togithub.com/alanprot) in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/646](https://togithub.com/prometheus/common/pull/646) - Set http_headers to be omit empty by [@​yeya24](https://togithub.com/yeya24) in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - chore: add HumanizeTimestamp; make ConvertToFloat exportable by [@​freak12techno](https://togithub.com/freak12techno) in [https://github.com/prometheus/common/pull/654](https://togithub.com/prometheus/common/pull/654) - Bump github.com/aws/aws-sdk-go from 1.53.14 to 1.54.7 in /sigv4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/659](https://togithub.com/prometheus/common/pull/659) - Bump golang.org/x/oauth2 from 0.20.0 to 0.21.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/656](https://togithub.com/prometheus/common/pull/656) - Bump google.golang.org/protobuf from 1.34.1 to 1.34.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/658](https://togithub.com/prometheus/common/pull/658) - Bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/common/pull/657](https://togithub.com/prometheus/common/pull/657) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/common/pull/660](https://togithub.com/prometheus/common/pull/660) - Add SigV4 FIPS STS endpoint config by [@​rajagopalanand](https://togithub.com/rajagopalanand) in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) ##### New Contributors - [@​gotjosh](https://togithub.com/gotjosh) made their first contribution in [https://github.com/prometheus/common/pull/644](https://togithub.com/prometheus/common/pull/644) - [@​mikelolasagasti](https://togithub.com/mikelolasagasti) made their first contribution in [https://github.com/prometheus/common/pull/625](https://togithub.com/prometheus/common/pull/625) - [@​alanprot](https://togithub.com/alanprot) made their first contribution in [https://github.com/prometheus/common/pull/653](https://togithub.com/prometheus/common/pull/653) - [@​yeya24](https://togithub.com/yeya24) made their first contribution in [https://github.com/prometheus/common/pull/655](https://togithub.com/prometheus/common/pull/655) - [@​rajagopalanand](https://togithub.com/rajagopalanand) made their first contribution in [https://github.com/prometheus/common/pull/649](https://togithub.com/prometheus/common/pull/649) **Full Changelog**: prometheus/common@v0.54.0...v0.55.0 </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
See the discussion here: prometheus/prometheus#14202
Basically copied HumanizeTimestamp from prometheus repo to move it there and added some tests (basically refactored to avoid using templating), the idea is to remove its implementation and the implementation of ConvertToFloat (which are both used in alertmanager and prometheus repos) from both prometheus and alertmanager repos to include the implementation from this repo.
@gotjosh can you check?