From 43c86d4c7d554c751b9e72e5e81a4fe7a2328131 Mon Sep 17 00:00:00 2001 From: whitneygriffith Date: Mon, 28 Oct 2024 22:10:16 +0000 Subject: [PATCH] resolve comments Signed-off-by: whitneygriffith --- exporter/azuremonitorexporter/trace_to_envelope.go | 2 +- exporter/azuremonitorexporter/traceexporter_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index f9ca56035026d..eb5d454d2f716 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -106,7 +106,7 @@ func spanToTelemetryTraces( spanEvent := span.Events().At(i) // Skip non-exception events if configured - if spanEvent.Name() != exceptionSpanEventName && !spanEventsEnabled { + if !spanEventsEnabled && spanEvent.Name() != exceptionSpanEventName { continue } diff --git a/exporter/azuremonitorexporter/traceexporter_test.go b/exporter/azuremonitorexporter/traceexporter_test.go index 6dae67f72de64..ad6a7e2427ecd 100644 --- a/exporter/azuremonitorexporter/traceexporter_test.go +++ b/exporter/azuremonitorexporter/traceexporter_test.go @@ -91,7 +91,7 @@ func TestExporterTraceDataCallbackSingleSpanWithSpanEvents(t *testing.T) { } // Tests the export onTraceData callback with a single Span that fails to produce an envelope -// TODO: Depercate this test when transport channel is removed as we will not be using envelopes anymore +// TODO: Deprecate this test when transport channel is removed as we will not be using envelopes anymore func TestExporterTraceDataCallbackSingleSpanNoEnvelope(t *testing.T) { mockTransportChannel := getMockTransportChannel() mockTelemetryClient := getMockTelemetryClient() @@ -144,4 +144,4 @@ func getExporter(config *Config, transportChannel transportChannel, telemetryCli telemetryClient: telemetryClient, logger: zap.NewNop(), } -} \ No newline at end of file +}