Sha256: f89490d23b0b4ee05e2be5fb253b8dd199f75596553a2f1acaed2009087d5a0f

Contents?: true

Size: 855 Bytes

Versions: 14

Compression:

Stored size: 855 Bytes

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/utils/metrics_hash'

module Contrast
  module Agent
    module Telemetry
      # This class will hold the basic information for a Telemetry Event
      class Event
        include Contrast::Utils

        attr_reader :tags

        def initialize
          @tags = MetricsHash.new(String)
          @timestamp = Time.now.iso8601
        end

        def path
          ''
        end

        def to_hash **_args
          {
              tags: @tags,
              timestamp: @timestamp,
              instance: Contrast::Agent::Telemetry::Base.instance_id,
              application: Contrast::Agent::Telemetry::Base.application_id
          }
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
contrast-agent-6.6.5 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.6.4 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.6.3 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.6.2 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.6.1 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.6.0 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.5.1 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.5.0 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.4.0 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.3.0 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.2.0 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.1.2 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.1.1 lib/contrast/agent/telemetry/events/event.rb
contrast-agent-6.1.0 lib/contrast/agent/telemetry/events/event.rb