From e2b667ae23ea36fae3c5986fade35d1cc5a0b190 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Fri, 12 Jul 2024 13:48:15 -0400 Subject: [PATCH] linting fixes --- lib/datadog/tracing/span_event.rb | 2 +- spec/datadog/opentelemetry_spec.rb | 4 ++-- spec/datadog/tracing/transport/serializable_trace_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/datadog/tracing/span_event.rb b/lib/datadog/tracing/span_event.rb index a347885d394..1a31f652fb2 100644 --- a/lib/datadog/tracing/span_event.rb +++ b/lib/datadog/tracing/span_event.rb @@ -30,7 +30,7 @@ def initialize( end def to_hash - h = { :name => @name, :time_unix_nano => @time_unix_nano } + h = { name: @name, time_unix_nano: @time_unix_nano } h[:attributes] = @attributes unless @attributes.empty? h end diff --git a/spec/datadog/opentelemetry_spec.rb b/spec/datadog/opentelemetry_spec.rb index 5016b62817d..f81bde2189e 100644 --- a/spec/datadog/opentelemetry_spec.rb +++ b/spec/datadog/opentelemetry_spec.rb @@ -638,14 +638,14 @@ context 'with name, attributes and timestamp' do let(:event_options) do - { attributes: { 'raised' => false, 'handler' => 'default', 'count' => 1 }, timestamp: 17206369349 } + { attributes: { raised: false, handler: 'default', count: 1 }, timestamp: 17206369349 } end it 'adds one event to the span' do expect(span.events.count).to eq(1) expect(span.events[0].name).to eq('Exception was raised!') expect(span.events[0].time_unix_nano).to eq(17206369349000000000) - expect(span.events[0].attributes).to eq({ 'raised' => 'false', 'handler' => 'default', 'count' => '1' }) + expect(span.events[0].attributes).to eq({ raised: false, handler: 'default', count: 1 }) end end diff --git a/spec/datadog/tracing/transport/serializable_trace_spec.rb b/spec/datadog/tracing/transport/serializable_trace_spec.rb index fa5b40924b8..056a6afde0b 100644 --- a/spec/datadog/tracing/transport/serializable_trace_spec.rb +++ b/spec/datadog/tracing/transport/serializable_trace_spec.rb @@ -145,7 +145,7 @@ Datadog::Tracing::SpanEvent.new( "Another Event #{i}!", time_unix_nano: 2_000_000_000, - attributes: { 'id' => i, 'required' => i == 1 }, + attributes: { id: i, required: => i == 1 }, ), ], )