Search in sources :

Example 1 with SpanReplaceRegexTransformer

use of com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer in project java by wavefrontHQ.

the class JaegerGrpcCollectorHandlerTest method testJaegerPreprocessedDerivedMetrics.

/**
 * Test for derived metrics emitted from Jaeger trace listeners. Derived metrics should report
 * tag values post applying preprocessing rules to the span.
 */
@Test
public void testJaegerPreprocessedDerivedMetrics() throws Exception {
    reset(mockTraceHandler, mockWavefrontSender);
    mockTraceHandler.report(Span.newBuilder().setCustomer("dummy").setStartMillis(startTime).setDuration(4000).setName("HTTP GET").setSource(PREPROCESSED_SOURCE_VALUE).setSpanId("00000000-0000-0000-0000-00000012d687").setTraceId("00000000-4996-02d2-0000-011f71fb04cb").setAnnotations(ImmutableList.of(new Annotation("ip", "10.0.0.1"), new Annotation("service", PREPROCESSED_SERVICE_TAG_VALUE), new Annotation("application", PREPROCESSED_APPLICATION_TAG_VALUE), new Annotation("cluster", PREPROCESSED_CLUSTER_TAG_VALUE), new Annotation("shard", PREPROCESSED_SHARD_TAG_VALUE))).build());
    expectLastCall();
    Capture<HashMap<String, String>> tagsCapture = EasyMock.newCapture();
    mockWavefrontSender.sendMetric(eq(HEART_BEAT_METRIC), eq(1.0), anyLong(), eq(PREPROCESSED_SOURCE_VALUE), EasyMock.capture(tagsCapture));
    expectLastCall().anyTimes();
    replay(mockTraceHandler, mockWavefrontSender);
    Supplier<ReportableEntityPreprocessor> preprocessorSupplier = () -> {
        ReportableEntityPreprocessor preprocessor = new ReportableEntityPreprocessor();
        PreprocessorRuleMetrics preprocessorRuleMetrics = new PreprocessorRuleMetrics(null, null, null);
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(APPLICATION_TAG_KEY, "^Jaeger.*", PREPROCESSED_APPLICATION_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SERVICE_TAG_KEY, "^test.*", PREPROCESSED_SERVICE_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer("sourceName", "^jaeger.*", PREPROCESSED_SOURCE_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(CLUSTER_TAG_KEY, "^none.*", PREPROCESSED_CLUSTER_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SHARD_TAG_KEY, "^none.*", PREPROCESSED_SHARD_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        return preprocessor;
    };
    JaegerGrpcCollectorHandler handler = new JaegerGrpcCollectorHandler("9876", mockTraceHandler, mockTraceLogsHandler, mockWavefrontSender, () -> false, () -> false, preprocessorSupplier, new SpanSampler(new RateSampler(1.0D), () -> null), null, null);
    Model.KeyValue ipTag = Model.KeyValue.newBuilder().setKey("ip").setVStr("10.0.0.1").setVType(Model.ValueType.STRING).build();
    ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES * 2);
    buffer.putLong(1234567890L);
    buffer.putLong(1234567890123L);
    ByteString traceId = ByteString.copyFrom(buffer.array());
    buffer = ByteBuffer.allocate(Long.BYTES);
    buffer.putLong(1234567L);
    ByteString span2Id = ByteString.copyFrom(buffer.array());
    Model.Span span2 = Model.Span.newBuilder().setTraceId(traceId).setSpanId(span2Id).setDuration(Duration.newBuilder().setSeconds(4L).build()).setOperationName("HTTP GET").setStartTime(fromMillis(startTime)).build();
    Model.Batch testBatch = Model.Batch.newBuilder().setProcess(Model.Process.newBuilder().setServiceName("testService").addTags(ipTag).build()).addAllSpans(ImmutableList.of(span2)).build();
    Collector.PostSpansRequest batches = Collector.PostSpansRequest.newBuilder().setBatch(testBatch).build();
    handler.postSpans(batches, emptyStreamObserver);
    handler.run();
    verifyWithTimeout(500, mockTraceHandler, mockWavefrontSender);
    HashMap<String, String> tagsReturned = tagsCapture.getValue();
    assertEquals(PREPROCESSED_APPLICATION_TAG_VALUE, tagsReturned.get(APPLICATION_TAG_KEY));
    assertEquals(PREPROCESSED_SERVICE_TAG_VALUE, tagsReturned.get(SERVICE_TAG_KEY));
    assertEquals(PREPROCESSED_CLUSTER_TAG_VALUE, tagsReturned.get(CLUSTER_TAG_KEY));
    assertEquals(PREPROCESSED_SHARD_TAG_VALUE, tagsReturned.get(SHARD_TAG_KEY));
}
Also used : ReportableEntityPreprocessor(com.wavefront.agent.preprocessor.ReportableEntityPreprocessor) HashMap(java.util.HashMap) RateSampler(com.wavefront.sdk.entities.tracing.sampling.RateSampler) ByteString(com.google.protobuf.ByteString) SpanSampler(com.wavefront.agent.sampler.SpanSampler) ByteString(com.google.protobuf.ByteString) ByteBuffer(java.nio.ByteBuffer) Annotation(wavefront.report.Annotation) PreprocessorRuleMetrics(com.wavefront.agent.preprocessor.PreprocessorRuleMetrics) Model(io.opentelemetry.exporters.jaeger.proto.api_v2.Model) Collector(io.opentelemetry.exporters.jaeger.proto.api_v2.Collector) SpanReplaceRegexTransformer(com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer) Test(org.junit.Test)

Example 2 with SpanReplaceRegexTransformer

use of com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer in project java by wavefrontHQ.

the class JaegerPortUnificationHandlerTest method testJaegerPreprocessedDerivedMetrics.

/**
 * Test for derived metrics emitted from Jaeger trace listeners. Derived metrics should report
 * tag values post applying preprocessing rules to the span.
 */
@Test
public void testJaegerPreprocessedDerivedMetrics() throws Exception {
    Supplier<ReportableEntityPreprocessor> preprocessorSupplier = () -> {
        ReportableEntityPreprocessor preprocessor = new ReportableEntityPreprocessor();
        PreprocessorRuleMetrics preprocessorRuleMetrics = new PreprocessorRuleMetrics(null, null, null);
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(APPLICATION_TAG_KEY, "^Jaeger.*", PREPROCESSED_APPLICATION_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SERVICE_TAG_KEY, "^test.*", PREPROCESSED_SERVICE_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer("sourceName", "^jaeger.*", PREPROCESSED_SOURCE_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(CLUSTER_TAG_KEY, "^none.*", PREPROCESSED_CLUSTER_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SHARD_TAG_KEY, "^none.*", PREPROCESSED_SHARD_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        return preprocessor;
    };
    JaegerPortUnificationHandler handler = new JaegerPortUnificationHandler("14268", TokenAuthenticatorBuilder.create().build(), new NoopHealthCheckManager(), mockTraceHandler, mockTraceSpanLogsHandler, mockWavefrontSender, () -> false, () -> false, preprocessorSupplier, new SpanSampler(new RateSampler(1.0D), () -> null), null, null);
    io.jaegertracing.thriftjava.Span span1 = new io.jaegertracing.thriftjava.Span(1234567890123L, 1234567890L, 1234567L, 0L, "HTTP GET", 1, startTime * 1000, 1234 * 1000);
    Batch testBatch = new Batch();
    testBatch.process = new Process();
    testBatch.process.serviceName = "testService";
    testBatch.setSpans(ImmutableList.of(span1));
    // Reset mock
    reset(mockCtx, mockTraceHandler, mockWavefrontSender);
    // Set Expectation
    Span expectedSpan1 = Span.newBuilder().setCustomer("dummy").setStartMillis(startTime).setDuration(1234).setName("HTTP GET").setSource(PREPROCESSED_SOURCE_VALUE).setSpanId("00000000-0000-0000-0000-00000012d687").setTraceId("00000000-4996-02d2-0000-011f71fb04cb").setAnnotations(ImmutableList.of(new Annotation("jaegerSpanId", "12d687"), new Annotation("jaegerTraceId", "499602d20000011f71fb04cb"), new Annotation("service", PREPROCESSED_SERVICE_TAG_VALUE), new Annotation("application", PREPROCESSED_APPLICATION_TAG_VALUE), new Annotation("cluster", PREPROCESSED_CLUSTER_TAG_VALUE), new Annotation("shard", PREPROCESSED_SHARD_TAG_VALUE))).build();
    mockTraceHandler.report(expectedSpan1);
    expectLastCall();
    Capture<HashMap<String, String>> tagsCapture = EasyMock.newCapture();
    mockWavefrontSender.sendMetric(eq(HEART_BEAT_METRIC), eq(1.0), anyLong(), eq(PREPROCESSED_SOURCE_VALUE), EasyMock.capture(tagsCapture));
    expectLastCall().anyTimes();
    replay(mockCtx, mockTraceHandler, mockWavefrontSender);
    ByteBuf content = Unpooled.copiedBuffer(new TSerializer().serialize(testBatch));
    FullHttpRequest httpRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "http://localhost:14268/api/traces", content, true);
    handler.handleHttpMessage(mockCtx, httpRequest);
    handler.run();
    verifyWithTimeout(500, mockTraceHandler, mockWavefrontSender);
    HashMap<String, String> tagsReturned = tagsCapture.getValue();
    assertEquals(PREPROCESSED_APPLICATION_TAG_VALUE, tagsReturned.get(APPLICATION_TAG_KEY));
    assertEquals(PREPROCESSED_SERVICE_TAG_VALUE, tagsReturned.get(SERVICE_TAG_KEY));
    assertEquals(PREPROCESSED_CLUSTER_TAG_VALUE, tagsReturned.get(CLUSTER_TAG_KEY));
    assertEquals(PREPROCESSED_SHARD_TAG_VALUE, tagsReturned.get(SHARD_TAG_KEY));
}
Also used : ReportableEntityPreprocessor(com.wavefront.agent.preprocessor.ReportableEntityPreprocessor) DefaultFullHttpRequest(io.netty.handler.codec.http.DefaultFullHttpRequest) FullHttpRequest(io.netty.handler.codec.http.FullHttpRequest) DefaultFullHttpRequest(io.netty.handler.codec.http.DefaultFullHttpRequest) RateSampler(com.wavefront.sdk.entities.tracing.sampling.RateSampler) HashMap(java.util.HashMap) SpanSampler(com.wavefront.agent.sampler.SpanSampler) Process(io.jaegertracing.thriftjava.Process) ByteBuf(io.netty.buffer.ByteBuf) Span(wavefront.report.Span) Annotation(wavefront.report.Annotation) PreprocessorRuleMetrics(com.wavefront.agent.preprocessor.PreprocessorRuleMetrics) TSerializer(org.apache.thrift.TSerializer) Batch(io.jaegertracing.thriftjava.Batch) NoopHealthCheckManager(com.wavefront.agent.channel.NoopHealthCheckManager) SpanReplaceRegexTransformer(com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer) Test(org.junit.Test)

Example 3 with SpanReplaceRegexTransformer

use of com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer in project java by wavefrontHQ.

the class ZipkinPortUnificationHandlerTest method testZipkinPreprocessedDerivedMetrics.

/**
 * Test for derived metrics emitted from Zipkin trace listeners. Derived metrics should report
 * tag values post applying preprocessing rules to the span.
 */
@Test
public void testZipkinPreprocessedDerivedMetrics() throws Exception {
    Supplier<ReportableEntityPreprocessor> preprocessorSupplier = () -> {
        ReportableEntityPreprocessor preprocessor = new ReportableEntityPreprocessor();
        PreprocessorRuleMetrics preprocessorRuleMetrics = new PreprocessorRuleMetrics(null, null, null);
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(APPLICATION_TAG_KEY, "^Zipkin.*", PREPROCESSED_APPLICATION_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SERVICE_TAG_KEY, "^test.*", PREPROCESSED_SERVICE_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer("sourceName", "^zipkin.*", PREPROCESSED_SOURCE_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(CLUSTER_TAG_KEY, "^none.*", PREPROCESSED_CLUSTER_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer(SHARD_TAG_KEY, "^none.*", PREPROCESSED_SHARD_TAG_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
        return preprocessor;
    };
    ZipkinPortUnificationHandler handler = new ZipkinPortUnificationHandler("9411", new NoopHealthCheckManager(), mockTraceHandler, mockTraceSpanLogsHandler, mockWavefrontSender, () -> false, () -> false, preprocessorSupplier, new SpanSampler(new RateSampler(1.0D), () -> null), null, null);
    Endpoint localEndpoint1 = Endpoint.newBuilder().serviceName("testService").ip("10.0.0.1").build();
    zipkin2.Span spanServer1 = zipkin2.Span.newBuilder().traceId("2822889fe47043bd").id("2822889fe47043bd").kind(zipkin2.Span.Kind.SERVER).name("getservice").timestamp(startTime * 1000).duration(1234 * 1000).localEndpoint(localEndpoint1).build();
    List<zipkin2.Span> zipkinSpanList = ImmutableList.of(spanServer1);
    // Reset mock
    reset(mockTraceHandler, mockWavefrontSender);
    // Set Expectation
    mockTraceHandler.report(Span.newBuilder().setCustomer("dummy").setStartMillis(startTime).setDuration(1234).setName("getservice").setSource(PREPROCESSED_SOURCE_VALUE).setSpanId("00000000-0000-0000-2822-889fe47043bd").setTraceId("00000000-0000-0000-2822-889fe47043bd").setAnnotations(ImmutableList.of(new Annotation("zipkinSpanId", "2822889fe47043bd"), new Annotation("zipkinTraceId", "2822889fe47043bd"), new Annotation("span.kind", "server"), new Annotation("service", PREPROCESSED_SERVICE_TAG_VALUE), new Annotation("application", PREPROCESSED_APPLICATION_TAG_VALUE), new Annotation("cluster", PREPROCESSED_CLUSTER_TAG_VALUE), new Annotation("shard", PREPROCESSED_SHARD_TAG_VALUE), new Annotation("ipv4", "10.0.0.1"))).build());
    expectLastCall();
    Capture<HashMap<String, String>> tagsCapture = EasyMock.newCapture();
    mockWavefrontSender.sendMetric(eq(HEART_BEAT_METRIC), eq(1.0), anyLong(), eq(PREPROCESSED_SOURCE_VALUE), EasyMock.capture(tagsCapture));
    expectLastCall().anyTimes();
    replay(mockTraceHandler, mockWavefrontSender);
    ChannelHandlerContext mockCtx = createNiceMock(ChannelHandlerContext.class);
    doMockLifecycle(mockCtx);
    ByteBuf content = Unpooled.copiedBuffer(SpanBytesEncoder.JSON_V2.encodeList(zipkinSpanList));
    FullHttpRequest httpRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "http://localhost:9411/api/v2/spans", content, true);
    handler.handleHttpMessage(mockCtx, httpRequest);
    handler.run();
    verifyWithTimeout(500, mockTraceHandler, mockWavefrontSender);
    HashMap<String, String> tagsReturned = tagsCapture.getValue();
    assertEquals(PREPROCESSED_APPLICATION_TAG_VALUE, tagsReturned.get(APPLICATION_TAG_KEY));
    assertEquals(PREPROCESSED_SERVICE_TAG_VALUE, tagsReturned.get(SERVICE_TAG_KEY));
    assertEquals(PREPROCESSED_CLUSTER_TAG_VALUE, tagsReturned.get(CLUSTER_TAG_KEY));
    assertEquals(PREPROCESSED_SHARD_TAG_VALUE, tagsReturned.get(SHARD_TAG_KEY));
}
Also used : ReportableEntityPreprocessor(com.wavefront.agent.preprocessor.ReportableEntityPreprocessor) DefaultFullHttpRequest(io.netty.handler.codec.http.DefaultFullHttpRequest) FullHttpRequest(io.netty.handler.codec.http.FullHttpRequest) DefaultFullHttpRequest(io.netty.handler.codec.http.DefaultFullHttpRequest) RateSampler(com.wavefront.sdk.entities.tracing.sampling.RateSampler) HashMap(java.util.HashMap) SpanSampler(com.wavefront.agent.sampler.SpanSampler) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) ByteBuf(io.netty.buffer.ByteBuf) Span(wavefront.report.Span) Annotation(wavefront.report.Annotation) PreprocessorRuleMetrics(com.wavefront.agent.preprocessor.PreprocessorRuleMetrics) Endpoint(zipkin2.Endpoint) NoopHealthCheckManager(com.wavefront.agent.channel.NoopHealthCheckManager) SpanReplaceRegexTransformer(com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer) Test(org.junit.Test)

Example 4 with SpanReplaceRegexTransformer

use of com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer in project java by wavefrontHQ.

the class PushAgentTest method setUserPreprocessorForTraceDerivedREDMetrics.

private void setUserPreprocessorForTraceDerivedREDMetrics(int port) {
    ReportableEntityPreprocessor preprocessor = new ReportableEntityPreprocessor();
    PreprocessorRuleMetrics preprocessorRuleMetrics = new PreprocessorRuleMetrics(null, null, null);
    preprocessor.forSpan().addTransformer(new SpanAddAnnotationIfNotExistsTransformer("application", PREPROCESSED_APPLICATION_TAG_VALUE, x -> true, preprocessorRuleMetrics));
    preprocessor.forSpan().addTransformer(new SpanAddAnnotationIfNotExistsTransformer("service", PREPROCESSED_SERVICE_TAG_VALUE, x -> true, preprocessorRuleMetrics));
    preprocessor.forSpan().addTransformer(new SpanAddAnnotationIfNotExistsTransformer("cluster", PREPROCESSED_CLUSTER_TAG_VALUE, x -> true, preprocessorRuleMetrics));
    preprocessor.forSpan().addTransformer(new SpanAddAnnotationIfNotExistsTransformer("shard", PREPROCESSED_SHARD_TAG_VALUE, x -> true, preprocessorRuleMetrics));
    preprocessor.forSpan().addTransformer(new SpanReplaceRegexTransformer("sourceName", "^test.*", PREPROCESSED_SOURCE_VALUE, null, null, false, x -> true, preprocessorRuleMetrics));
    Map<String, ReportableEntityPreprocessor> userPreprocessorMap = new HashMap<>();
    userPreprocessorMap.put(String.valueOf(port), preprocessor);
    proxy.preprocessors.userPreprocessors = userPreprocessorMap;
}
Also used : PreprocessorRuleMetrics(com.wavefront.agent.preprocessor.PreprocessorRuleMetrics) QueueingReason(com.wavefront.agent.data.QueueingReason) MockReportableEntityHandlerFactory(com.wavefront.agent.handlers.MockReportableEntityHandlerFactory) HttpPost(org.apache.http.client.methods.HttpPost) SSLContext(javax.net.ssl.SSLContext) TestUtils.httpPost(com.wavefront.agent.TestUtils.httpPost) TrustManager(javax.net.ssl.TrustManager) ReportEvent(wavefront.report.ReportEvent) TestUtils.findAvailablePort(com.wavefront.agent.TestUtils.findAvailablePort) StatusLine(org.apache.http.StatusLine) SecureRandom(java.security.SecureRandom) APPLICATION_TAG_KEY(com.wavefront.sdk.common.Constants.APPLICATION_TAG_KEY) DurationSampler(com.wavefront.sdk.entities.tracing.sampling.DurationSampler) ReportableEntityHandler(com.wavefront.agent.handlers.ReportableEntityHandler) EasyMock.reset(org.easymock.EasyMock.reset) After(org.junit.After) Map(java.util.Map) HandlerKey(com.wavefront.agent.handlers.HandlerKey) ReportPoint(wavefront.report.ReportPoint) TestUtils.getResource(com.wavefront.agent.TestUtils.getResource) Assert.fail(org.junit.Assert.fail) TestUtils.verifyWithTimeout(com.wavefront.agent.TestUtils.verifyWithTimeout) HEART_BEAT_METRIC(com.wavefront.sdk.common.Constants.HEART_BEAT_METRIC) EasyMock.eq(org.easymock.EasyMock.eq) SpanAddAnnotationIfNotExistsTransformer(com.wavefront.agent.preprocessor.SpanAddAnnotationIfNotExistsTransformer) HealthCheckManagerImpl(com.wavefront.agent.channel.HealthCheckManagerImpl) SHARD_TAG_KEY(com.wavefront.sdk.common.Constants.SHARD_TAG_KEY) SenderTask(com.wavefront.agent.handlers.SenderTask) ImmutableMap(com.google.common.collect.ImmutableMap) Collection(java.util.Collection) ReportableEntityPreprocessor(com.wavefront.agent.preprocessor.ReportableEntityPreprocessor) StringEntity(org.apache.http.entity.StringEntity) UUID(java.util.UUID) Span(wavefront.report.Span) Logger(java.util.logging.Logger) NotThreadSafe(net.jcip.annotations.NotThreadSafe) SSLSocketFactory(javax.net.ssl.SSLSocketFactory) SourceTag(com.wavefront.dto.SourceTag) SocketFactory(javax.net.SocketFactory) ReportableEntityType(com.wavefront.data.ReportableEntityType) AgentConfiguration(com.wavefront.api.agent.AgentConfiguration) List(java.util.List) SERVICE_TAG_KEY(com.wavefront.sdk.common.Constants.SERVICE_TAG_KEY) Assert.assertFalse(org.junit.Assert.assertFalse) GZIPOutputStream(java.util.zip.GZIPOutputStream) CLUSTER_TAG_KEY(com.wavefront.sdk.common.Constants.CLUSTER_TAG_KEY) SourceTagAction(wavefront.report.SourceTagAction) Annotation(wavefront.report.Annotation) PreprocessorRuleMetrics(com.wavefront.agent.preprocessor.PreprocessorRuleMetrics) Socket(java.net.Socket) BeforeClass(org.junit.BeforeClass) ByteArrayOutputStream(java.io.ByteArrayOutputStream) ReportSourceTag(wavefront.report.ReportSourceTag) SpanSampler(com.wavefront.agent.sampler.SpanSampler) HashMap(java.util.HashMap) SpanLogs(wavefront.report.SpanLogs) SourceOperationType(wavefront.report.SourceOperationType) BufferedOutputStream(java.io.BufferedOutputStream) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList) Event(com.wavefront.dto.Event) HttpClient(org.apache.http.client.HttpClient) EasyMock.replay(org.easymock.EasyMock.replay) EasyMock.startsWith(org.easymock.EasyMock.startsWith) NaiveTrustManager(com.wavefront.agent.tls.NaiveTrustManager) TestUtils.httpGet(com.wavefront.agent.TestUtils.httpGet) Nonnull(javax.annotation.Nonnull) Before(org.junit.Before) EasyMock.anyObject(org.easymock.EasyMock.anyObject) Capture(org.easymock.Capture) HttpsURLConnection(javax.net.ssl.HttpsURLConnection) SenderTaskFactory(com.wavefront.agent.handlers.SenderTaskFactory) EasyMock.anyString(org.easymock.EasyMock.anyString) WavefrontSender(com.wavefront.sdk.common.WavefrontSender) TestUtils.gzippedHttpPost(com.wavefront.agent.TestUtils.gzippedHttpPost) Assert.assertTrue(org.junit.Assert.assertTrue) AssertionFailedError(junit.framework.AssertionFailedError) Test(org.junit.Test) DeltaCounterAccumulationHandlerImpl(com.wavefront.agent.handlers.DeltaCounterAccumulationHandlerImpl) EasyMock(org.easymock.EasyMock) EasyMock.expect(org.easymock.EasyMock.expect) SpanLog(wavefront.report.SpanLog) KeyManager(javax.net.ssl.KeyManager) EasyMock.expectLastCall(org.easymock.EasyMock.expectLastCall) RateSampler(com.wavefront.sdk.entities.tracing.sampling.RateSampler) CaptureType(org.easymock.CaptureType) ReportableEntityHandlerFactory(com.wavefront.agent.handlers.ReportableEntityHandlerFactory) TestUtils.waitUntilListenerIsOnline(com.wavefront.agent.TestUtils.waitUntilListenerIsOnline) EasyMock.anyLong(org.easymock.EasyMock.anyLong) HttpResponse(org.apache.http.HttpResponse) EasyMock.verify(org.easymock.EasyMock.verify) Histogram(wavefront.report.Histogram) HistogramType(wavefront.report.HistogramType) Assert.assertEquals(org.junit.Assert.assertEquals) SpanReplaceRegexTransformer(com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer) ReportableEntityPreprocessor(com.wavefront.agent.preprocessor.ReportableEntityPreprocessor) HashMap(java.util.HashMap) SpanAddAnnotationIfNotExistsTransformer(com.wavefront.agent.preprocessor.SpanAddAnnotationIfNotExistsTransformer) EasyMock.anyString(org.easymock.EasyMock.anyString) SpanReplaceRegexTransformer(com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer)

Aggregations

PreprocessorRuleMetrics (com.wavefront.agent.preprocessor.PreprocessorRuleMetrics)4 ReportableEntityPreprocessor (com.wavefront.agent.preprocessor.ReportableEntityPreprocessor)4 SpanReplaceRegexTransformer (com.wavefront.agent.preprocessor.SpanReplaceRegexTransformer)4 SpanSampler (com.wavefront.agent.sampler.SpanSampler)4 RateSampler (com.wavefront.sdk.entities.tracing.sampling.RateSampler)4 HashMap (java.util.HashMap)3 Test (org.junit.Test)3 Annotation (wavefront.report.Annotation)3 NoopHealthCheckManager (com.wavefront.agent.channel.NoopHealthCheckManager)2 ByteBuf (io.netty.buffer.ByteBuf)2 DefaultFullHttpRequest (io.netty.handler.codec.http.DefaultFullHttpRequest)2 FullHttpRequest (io.netty.handler.codec.http.FullHttpRequest)2 Span (wavefront.report.Span)2 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 ByteString (com.google.protobuf.ByteString)1 TestUtils.findAvailablePort (com.wavefront.agent.TestUtils.findAvailablePort)1 TestUtils.getResource (com.wavefront.agent.TestUtils.getResource)1 TestUtils.gzippedHttpPost (com.wavefront.agent.TestUtils.gzippedHttpPost)1 TestUtils.httpGet (com.wavefront.agent.TestUtils.httpGet)1