Skip to content

Commit

Permalink
Events (#52)
Browse files Browse the repository at this point in the history
* WIP

* Updated code to use new Events

* Moved Event back to Observation
  • Loading branch information
marcingrzejszczak authored Aug 25, 2022
1 parent a6cd61c commit 9a90bd2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ subprojects {
description = 'Facade over tracing concepts'

repositories {
mavenLocal()
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

package io.micrometer.tracing.brave.handler;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import brave.Tracing;
import brave.handler.MutableSpan;
import brave.test.TestSpanHandler;
Expand All @@ -37,6 +32,11 @@
import io.micrometer.tracing.test.simple.SpansAssert;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import static org.assertj.core.api.BDDAssertions.then;

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -142,7 +142,7 @@ void should_signal_errors() {

@Test
void should_signal_events() {
Observation.Event event = new Observation.Event("foo", "bar");
Observation.Event event = Observation.Event.of("foo", "bar");
Observation.Context context = new Observation.Context();
context.setName("foo");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,12 @@

package io.micrometer.tracing.otel.handler;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.stream.Collectors;

import io.micrometer.observation.Observation;
import io.micrometer.observation.tck.TestObservationRegistry;
import io.micrometer.tracing.Tracer;
import io.micrometer.tracing.exporter.FinishedSpan;
import io.micrometer.tracing.handler.DefaultTracingObservationHandler;
import io.micrometer.tracing.otel.bridge.ArrayListSpanProcessor;
import io.micrometer.tracing.otel.bridge.OtelBaggageManager;
import io.micrometer.tracing.otel.bridge.OtelCurrentTraceContext;
import io.micrometer.tracing.otel.bridge.OtelFinishedSpan;
import io.micrometer.tracing.otel.bridge.OtelTracer;
import io.micrometer.tracing.otel.bridge.*;
import io.micrometer.tracing.test.simple.SpanAssert;
import io.micrometer.tracing.test.simple.SpansAssert;
import io.opentelemetry.api.common.AttributeKey;
Expand All @@ -44,6 +34,12 @@
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.stream.Collectors;

import static org.assertj.core.api.BDDAssertions.then;

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -160,7 +156,7 @@ void should_signal_errors() {

@Test
void should_signal_events() {
Observation.Event event = new Observation.Event("foo", "bar");
Observation.Event event = Observation.Event.of("foo", "bar");
Observation.Context context = new Observation.Context();
context.setName("foo");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
api project(':micrometer-tracing')
api project(':micrometer-tracing-test')
api project(':micrometer-tracing-reporter-wavefront')
api 'io.micrometer:micrometer-core'
api 'io.micrometer:micrometer-test'

// Brave
Expand Down

0 comments on commit 9a90bd2

Please sign in to comment.