-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Adds Observation API usage #4065
Adds Observation API usage #4065
Conversation
55c4783
to
be4a3d8
Compare
ef42bb1
to
c20813f
Compare
Thank you for your effort on this! I'm able to see tracing data in Zipkin in the new sample. However, the test |
without this change the BatchJobTagsProvider or BatchStepTagsProvider is not applied because it has a condition on instanceof BatchJobContext or BatchStepContext with this change we're adding the missing context when the observation is created, without this the default context was used
Yeah, check the commit 61ec4d4 |
* Fix tests * Update Javadocs * Update year in license headers * Move observability APIs to a separate package
Rebased, squashed and merged as e917d75. There are a couple of failing tests that I fixed in ae6c0b9. The documentation changes that are expected to generate metrics and tracing meta-data did not work and failed with the following error:
These changes have been omitted from this PR. Please open a separate PR for that. Thank you for all your effort in introducing the new Observation APIs in Spring Batch! |
* Fix tests * Update Javadocs * Update year in license headers * Move observability APIs to a separate package
This is what is recommended by the observability team in terms of tag naming with micrometer 1.10+ for consistency between both metrics and tracing. In #4065, only some metrics have been updated to follow this tag naming convention, but not all of them. This commit updates all metrics in a similar way for consistency. Related to #4065 and #4098.
Prerequisites
Support for latest Micrometer 2.0.0 snapshots: https://github.com/spring-projects/spring-batch/pull/4060/files
What's done
Job
s andStep
s.Additional info
Trace view from Zipkin
Metrics from
MeterRegistry
Notice the new
spring.batch.job
andspring.batch.step
.cc @jonatan-ivanov @shakuzen