[chore] Migrate to github.com/prometheus/otlptranslator#39827
Conversation
It's not a requirement, it's an idea to avoid code duplication in the OTel collector. If we don't move it to otlptranslator, do you have any other suggestions? |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
@ArthurSens Do you need help picking this up? |
|
urgh, |
20c88d5 to
3fcf6d1
Compare
ywwg
left a comment
There was a problem hiding this comment.
looking great! My main worry is the overhead of creating all the new metricNamer objects -- are there places where it can be built once for many metrics? And do we have benchmarks we can run to see if it's actually a problem?
5e4bb49 to
30b7445
Compare
ywwg
left a comment
There was a problem hiding this comment.
looks great! Just one small nit
| } | ||
|
|
||
| func newCollector(config *Config, logger *zap.Logger) *collector { | ||
| labelNamer := otlptranslator.LabelNamer{} |
There was a problem hiding this comment.
looks like this one can also be inline in the return struct
There was a problem hiding this comment.
it can't because we're using it to clean up the namespace 😬
|
@dashpole since you offered help earlier, would you please review and approve if the changes look ok? |
|
great work! |
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
30b7445 to
ddf5413
Compare
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
#### Description Bumps the Prometheus library to the commit(prometheus/prometheus@0502f2d) that updates otlptranslator to the same version we need in open-telemetry#39827 Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
…ry#39827) #### Description This is an alternative for open-telemetry#39753, where we don't migrate the constants to the new library, but keep them closer to where they are used. I apologize for pinging so many people in this PR, but I tried to migrate all components at once just to see how big/challenging it is to do the whole migration. Pinging @aknuds1 and @ywwg as my fellow maintainer of prometheus/otlptranslators :) I see that we're still lacking a few things, like BuildCompliantUnit with and without UTF-8 allowed. We also need to think about what to do with the Prometheus receiver (pinging fellow code owner @krajorama), which uses the old library to do the reverse conversion. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Related to open-telemetry#39822 --------- Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Description
This is an alternative for #39753, where we don't migrate the constants to the new library, but keep them closer to where they are used.
I apologize for pinging so many people in this PR, but I tried to migrate all components at once just to see how big/challenging it is to do the whole migration.
Pinging @aknuds1 and @ywwg as my fellow maintainer of prometheus/otlptranslators :)
I see that we're still lacking a few things, like BuildCompliantUnit with and without UTF-8 allowed. We also need to think about what to do with the Prometheus receiver (pinging fellow code owner @krajorama), which uses the old library to do the reverse conversion.
Link to tracking issue
Related to #39822