From 73d7d3d105c402b8431a247c8e72092bafb0a08b Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 12 Jun 2023 16:01:39 +0200 Subject: [PATCH] Added a getter to OTLA for ObservationRegistry --- .../ObservationThreadLocalAccessor.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/micrometer-observation/src/main/java/io/micrometer/observation/contextpropagation/ObservationThreadLocalAccessor.java b/micrometer-observation/src/main/java/io/micrometer/observation/contextpropagation/ObservationThreadLocalAccessor.java index ec55adb10a..6fdcf6ec80 100644 --- a/micrometer-observation/src/main/java/io/micrometer/observation/contextpropagation/ObservationThreadLocalAccessor.java +++ b/micrometer-observation/src/main/java/io/micrometer/observation/contextpropagation/ObservationThreadLocalAccessor.java @@ -71,6 +71,14 @@ public void setObservationRegistry(ObservationRegistry observationRegistry) { this.observationRegistry = observationRegistry; } + /** + * Returns the provided {@link ObservationRegistry}. + * @return observation registry + */ + public ObservationRegistry getObservationRegistry() { + return this.observationRegistry; + } + /** * Return the singleton instance of this {@link ObservationThreadLocalAccessor}. * @return instance