-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
67a6bf8
to
83bd0e4
Compare
|
||
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. |
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.
DITTO:
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(); |
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.
It looks like default
method on the ObservationConvention
does exactly the same
|
||
@Override | ||
public String asString() { | ||
return "bean.name"; |
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.
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
?
spring-kafka/src/test/java/org/springframework/kafka/support/micrometer/ObservationTests.java
Show resolved
Hide resolved
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 one still fails on the GH actions.
Probably because of that async stop()
feature you try to incorporate.
would you mind to look into this PR as well?
Should be similar to what we have so far in Spring AMQP.
Thank you!
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'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() { |
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.
Don't set the name here - please set it via the convention
|
||
@Override | ||
public String getName() { | ||
return "spring.kafka.template"; |
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.
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.
4f3a4bf
to
f45c1b5
Compare
Resolves #2198