watermill icon indicating copy to clipboard operation
watermill copied to clipboard

feat(metrics): add opentelemetry support

Open ahkui opened this issue 5 months ago • 1 comments
trafficstars

Signed-off-by: ahkui [email protected]

#574

Motivation / Background

Implement metrics collection using the OpenTelemetry MeterProvider

Detail

Implement metrics collection using the OpenTelemetry MeterProvider

Alternative approaches considered (if applicable)

Checklist

The resources of our team are limited. There are a couple of things that you can do to help us merge your PR faster:

  • [ ] I wrote tests for the changes.
  • [x] All tests are passing.
    • If you are testing a Pub/Sub, you can start Docker with make up.
    • You can start with make test_short for a quick check.
    • If you want to run all tests, use make test.
  • [x] Code has no breaking changes.
  • [x] (If applicable) documentation on watermill.io is updated.

ahkui avatar May 26 '25 16:05 ahkui

Hi @roblaszczak and @m110,

Could you please help review this PR when you have a moment?

Thanks!

ahkui avatar May 28 '25 07:05 ahkui

We had this issue with OpenTelemtry in many projects: https://github.com/open-telemetry/opentelemetry-go/issues/4476

To avoid that it would be good to move OpenTelemetry implementation to a separate package, with a separate go.mod. So the main go.mod won't be affected.

I would moving those changes to a separate components/opentelemetry package.

Do you feel you'll have time for that @ahkui? Let us know!

roblaszczak avatar Aug 25 '25 13:08 roblaszczak

We had this issue with OpenTelemtry in many projects: open-telemetry/opentelemetry-go#4476

To avoid that it would be good to move OpenTelemetry implementation to a separate package, with a separate go.mod. So the main go.mod won't be affected.

I would moving those changes to a separate components/opentelemetry package.

Do you feel you'll have time for that @ahkui? Let us know!

@roblaszczak yes, i can handle that

the new pkg i will move to components/metrics/opentelemetry, do you have other suggestion for the location ?

ahkui avatar Sep 18 '25 15:09 ahkui

We had this issue with OpenTelemtry in many projects: open-telemetry/opentelemetry-go#4476 To avoid that it would be good to move OpenTelemetry implementation to a separate package, with a separate go.mod. So the main go.mod won't be affected. I would moving those changes to a separate components/opentelemetry package. Do you feel you'll have time for that @ahkui? Let us know!

@roblaszczak yes, i can handle that

the new pkg i will move to components/metrics/opentelemetry, do you have other suggestion for the location ?

Hey, I discussed it with @m110 and since it looks orthogonal to the metrics package we can keep it flat (keeping it in sub-directory would suggest that it depends on metrics).

So I would suggest components/opentelemetry. It will be also easier to find :-)

roblaszczak avatar Oct 16 '25 14:10 roblaszczak