Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur authored Jul 12, 2024
1 parent 6d71a35 commit e2b667a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/tracing/span_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/datadog/opentelemetry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/transport/serializable_trace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
),
],
)
Expand Down

0 comments on commit e2b667a

Please sign in to comment.