Skip to content

Further enhancement to OtlpMetricsSender - #6025

Merged
shakuzen merged 1 commit into
micrometer-metrics:mainfrom
shakuzen:otlpsender-request
Mar 26, 2025
Merged

shakuzen merged 1 commit into
micrometer-metrics:mainfrom
shakuzen:otlpsender-request

Conversation

@shakuzen

Copy link
Copy Markdown
Member

Introduces an immutable Request object and builder for convenience.

See review comments on #5994 and original PR #5691.

@shakuzen shakuzen added enhancement A general enhancement breaking-change registry: otlp OpenTelemetry Protocol (OTLP) registry-related labels Mar 14, 2025
@shakuzen shakuzen added this to the 1.15.0-RC1 milestone Mar 14, 2025

@shakuzen shakuzen left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may tweak things more, but I wanted to open this for review.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this (as package-private) made things more complicated when introducing the Request class that we need to be public, so I removed it. It was only there to demonstrate that the OtlpMetricsSender could be made more generic for use in other registries, but until we verify that need more, let's remove this.

response = httpRequest.send();
}
catch (Throwable e) {
throw new Exception(e);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the HttpSender throws Throwable, we need to catch it here. Wrapping in Exception feels weird but I'm not sure what's better to do.

@shakuzen
shakuzen force-pushed the otlpsender-request branch 2 times, most recently from 884d7c8 to df32a06 Compare March 17, 2025 07:54
@shakuzen
shakuzen force-pushed the otlpsender-request branch 2 times, most recently from d7841a0 to 55da842 Compare March 19, 2025 09:24
@shakuzen
shakuzen force-pushed the otlpsender-request branch from 55da842 to 4394738 Compare March 26, 2025 06:00
Introduces an immutable Request object and builder.
@shakuzen
shakuzen force-pushed the otlpsender-request branch from 4394738 to 7fe776c Compare March 26, 2025 06:04
@shakuzen
shakuzen enabled auto-merge (squash) March 26, 2025 06:09
@shakuzen
shakuzen merged commit bf5f0ee into micrometer-metrics:main Mar 26, 2025
izeye added a commit to izeye/micrometer that referenced this pull request Mar 29, 2025
Signed-off-by: Johnny Lim <izeye@naver.com>
@izeye izeye mentioned this pull request Mar 29, 2025
izeye added a commit to izeye/micrometer that referenced this pull request Mar 30, 2025
Signed-off-by: Johnny Lim <izeye@naver.com>
jonatan-ivanov pushed a commit that referenced this pull request Mar 30, 2025
Signed-off-by: Johnny Lim <izeye@naver.com>
@shakuzen
shakuzen deleted the otlpsender-request branch April 15, 2025 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change enhancement A general enhancement registry: otlp OpenTelemetry Protocol (OTLP) registry-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants