Sha256: 823fd62ce2930f64efe3ef6bccee3e1fcd629c526602e45d58b1819a6c9ee0f8

Contents?: true

Size: 1.78 KB

Versions: 18

Compression:

Stored size: 1.78 KB

Contents

# rubocop:disable Naming/FileName
# frozen_string_literal: true

# LabKit is a module for handling cross-project
# infrastructural concerns, partcularly related to
# observability.
module Labkit
  autoload :System, "labkit/system"

  autoload :Correlation, "labkit/correlation"
  autoload :Context, "labkit/context"
  autoload :FIPS, "labkit/fips"
  autoload :Tracing, "labkit/tracing"
  autoload :Logging, "labkit/logging"
  autoload :Middleware, "labkit/middleware"

  # Publishers to publish notifications whenever a HTTP reqeust is made.
  # A broadcasted notification's payload in topic "request.external_http" includes:
  #   + method (String): "GET"
  #   + code (String): "200" # This is the status code read directly from HTTP response
  #   + duration (Float - seconds): 0.234
  #   + host (String): "gitlab.com"
  #   + port (Integer): 80,
  #   + path (String): "/gitlab-org/gitlab"
  #   + scheme (String): "https"
  #   + query (String): "field_a=1&field_b=2"
  #   + fragment (String): "issue-number-1"
  #   + proxy_host (String - Optional): "proxy.gitlab.com"
  #   + proxy_port (Integer - Optional): 80
  #   + exception (Array<String> - Optional): ["Net::ReadTimeout", "Net::ReadTimeout with #<TCPSocket:(closed)>"]
  #   + exception_object (Error Object - Optional): #<Net::ReadTimeout: Net::ReadTimeout>
  #
  # Usage:
  #
  # ActiveSupport::Notifications.subscribe "request.external_http" do |name, started, finished, unique_id, data|
  #   puts "#{name} | #{started} | #{finished} | #{unique_id} | #{data.inspect}"
  # end
  #
  EXTERNAL_HTTP_NOTIFICATION_TOPIC = "request.external_http"
  autoload :NetHttpPublisher, "labkit/net_http_publisher"
  autoload :ExconPublisher, "labkit/excon_publisher"
  autoload :HTTPClientPublisher, "labkit/httpclient_publisher"
end

# rubocop:enable Naming/FileName

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gitlab-labkit-0.36.1 lib/gitlab-labkit.rb
gitlab-labkit-0.36.0 lib/gitlab-labkit.rb
gitlab-labkit-0.35.1 lib/gitlab-labkit.rb
gitlab-labkit-0.35.0 lib/gitlab-labkit.rb
gitlab-labkit-0.34.0 lib/gitlab-labkit.rb
gitlab-labkit-0.33.0 lib/gitlab-labkit.rb
gitlab-labkit-0.32.0 lib/gitlab-labkit.rb
gitlab-labkit-0.31.1 lib/gitlab-labkit.rb
gitlab-labkit-0.31.0 lib/gitlab-labkit.rb
gitlab-labkit-0.30.1 lib/gitlab-labkit.rb
gitlab-labkit-0.30.0 lib/gitlab-labkit.rb
gitlab-labkit-0.29.0 lib/gitlab-labkit.rb
gitlab-labkit-0.28.0 lib/gitlab-labkit.rb
gitlab-labkit-0.27.0 lib/gitlab-labkit.rb
gitlab-labkit-0.26.0 lib/gitlab-labkit.rb
gitlab-labkit-0.25.0 lib/gitlab-labkit.rb
gitlab-labkit-0.24.0 lib/gitlab-labkit.rb
gitlab-labkit-0.23.0 lib/gitlab-labkit.rb