From 78f8b785b0352f062c5c3fefcb5685a7ded1d270 Mon Sep 17 00:00:00 2001 From: Munir Abdinur Date: Wed, 10 Jul 2024 16:31:56 -0400 Subject: [PATCH] fmt --- lib/datadog/tracing/span_event.rb | 53 ++++++++++++++++--------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/lib/datadog/tracing/span_event.rb b/lib/datadog/tracing/span_event.rb index c8a3851c134..94ae526b731 100644 --- a/lib/datadog/tracing/span_event.rb +++ b/lib/datadog/tracing/span_event.rb @@ -1,34 +1,35 @@ +# frozen_string_literal: true + require 'time' # frozen_string_literal: true module Datadog - module Tracing - # SpanEvent represents an annotation on a span. - # @public_api - class SpanEvent - # @!attribute [r] name - # @return [Integer] - attr_reader :name - - # @!attribute [r] attributes - # @return [Hash] - attr_reader :attributes - - # @!attribute [r] time_unix_nano - # @return [Integer] - attr_reader :time_unix_nano - - def initialize( - name, - attributes: nil, - time_unix_nano: nil - ) - @name = name - @attributes = attributes&.map{|key, val| [key, val.to_s]}&.to_h || {} - @time_unix_nano = time_unix_nano || Core::Utils::Time.now.to_f * 1e9 - end + module Tracing + # SpanEvent represents an annotation on a span. + # @public_api + class SpanEvent + # @!attribute [r] name + # @return [Integer] + attr_reader :name + + # @!attribute [r] attributes + # @return [Hash] + attr_reader :attributes + + # @!attribute [r] time_unix_nano + # @return [Integer] + attr_reader :time_unix_nano + + def initialize( + name, + attributes: nil, + time_unix_nano: nil + ) + @name = name + @attributes = attributes&.map { |key, val| [key, val.to_s] }&.to_h || {} + @time_unix_nano = time_unix_nano || Core::Utils::Time.now.to_f * 1e9 end end end - \ No newline at end of file +end