Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored Dec 9, 2024
1 parent 0f04214 commit f58d4bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static class Example {
}

void run() {
final Observation observation = Observation.createNotStarted("foo", registry)
Observation observation = Observation.createNotStarted("foo", registry)
.lowCardinalityKeyValue("lowTag", "lowTagValue")
.highCardinalityKeyValue("highTag", "highTagValue");
observation.observe(() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public boolean supportsContext(Observation.Context context) {
}

@Override
public void onEvent(final Observation.Event event, final Observation.Context context) {
public void onEvent(Observation.Event event, Observation.Context context) {
this.contexts.stream()
.filter(testContext -> testContext.getContext() == context)
.findFirst()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ public TestObservationRegistryAssert backToTestObservationRegistry() {
* @return this
* @throws AssertionError if the {@link Observation} does not have an event with
* the given name
* @since 1.15.0
*/
public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(String name) {
isNotNull();
Expand All @@ -598,6 +599,7 @@ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(S
* @return this
* @throws AssertionError if the {@link Observation} does not have an event with
* the given name and contextual name
* @since 1.15.0
*/
public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(String name,
String contextualName) {
Expand All @@ -616,6 +618,7 @@ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(S
* @return this
* @throws AssertionError if the {@link Observation} has an event with the given
* name
* @since 1.15.0
*/
public TestObservationRegistryAssertReturningObservationContextAssert doesNotHaveEvent(String name) {
isNotNull();
Expand All @@ -629,10 +632,11 @@ public TestObservationRegistryAssertReturningObservationContextAssert doesNotHav
* Verifies that the {@link Observation} does not have an event with the given
* name and contextual name.
* @param name event name
* @param contextualName contextual name@
* @param contextualName contextual name
* @return this
* @throws AssertionError if the {@link Observation} has an event with the given
* name and contextual name
* @since 1.15.0
*/
public TestObservationRegistryAssertReturningObservationContextAssert doesNotHaveEvent(String name,
String contextualName) {
Expand Down

0 comments on commit f58d4bc

Please sign in to comment.