Skip to content

GH-2198: Spring Observability Initial Commit #2394

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

Merged
merged 14 commits into from
Sep 19, 2022

Conversation

garyrussell
Copy link
Contributor

Resolves #2198

@garyrussell
Copy link
Contributor Author

Screen Shot 2022-09-15 at 10 03 22 AM


Set `observationEnabled` on each component to enable observation; this will disable <<micrometer,Micrometer Timers>> because the timers will now be managed with each observation.

Refer to https://micrometer.io/docs/tracing#_running_integration_tests[Micrometer Tracing] for more information.
Copy link
Member

Choose a reason for hiding this comment

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

DITTO:

Suggested change
Refer to https://micrometer.io/docs/tracing#_running_integration_tests[Micrometer Tracing] for more information.
Refer to https://micrometer.io/docs/tracing[Micrometer Tracing] for more information.


@Override
public KeyValues getHighCardinalityKeyValues(KafkaRecordReceiverContext context) {
return KeyValues.empty();
Copy link
Member

Choose a reason for hiding this comment

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

It looks like default method on the ObservationConvention does exactly the same


@Override
public String asString() {
return "bean.name";
Copy link
Member

Choose a reason for hiding this comment

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

In Spring Integration PR @marcingrzejszczak has requested me to add a meaningful prefix to all the tags I expose on the observation: spring-projects/spring-integration#3879 (review).
So, probably this one should go as a spring.kafka.template.name ?

@garyrussell
Copy link
Contributor Author

With async stop...

Screen Shot 2022-09-15 at 3 58 53 PM

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

This one still fails on the GH actions.
Probably because of that async stop() feature you try to incorporate.

@marcingrzejszczak,

would you mind to look into this PR as well?
Should be similar to what we have so far in Spring AMQP.

Thank you!

Copy link

@marcingrzejszczak marcingrzejszczak left a comment

Choose a reason for hiding this comment

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

I've found 2 minor issues, other than that LGTM.

The question is if you want to use the automated documentation generation - https://micrometer.io/docs/tracing#_documentation_building , that way all of your observations would be automatically scanned and an adoc file will be created cc @artembilan

}

@Override
public String getName() {

Choose a reason for hiding this comment

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

Don't set the name here - please set it via the convention


@Override
public String getName() {
return "spring.kafka.template";

Choose a reason for hiding this comment

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

Don't set the name here - please set it via the convention

Fix Race in Test.

Fix Race in Test.

Fix Race in Test.

Fix Race in Test.
@garyrussell garyrussell merged commit 182c580 into spring-projects:main Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spring Observability
3 participants