Module: Contrast::Agent::Reporting::Endpoints

Extended by:
Components::Logger::InstanceMethods
Included in:
ReporterClient, ReporterClientUtils
Defined in:
lib/contrast/agent/reporting/reporting_utilities/endpoints.rb

Overview

This is the class which will hold up all the Endpoints we use for the direct report from the agent. It builds the full URLs needed for communication.

Constant Summary collapse

APP_LANGUAGE =
Contrast::Utils::ObjectShare::RUBY.upcase.cs__freeze
ENDPOINT_VERSION =
'/v1.0'.cs__freeze
NG_ENDPOINTS =
{
    application_activity: "#{ Contrast::API.api_url }/api/ng/activity/application",
    application_create: "#{ Contrast::API.api_url }/api/ng/applications/create",
    agent_startup: "#{ Contrast::API.api_url }/api/ng/servers/"
}.cs__freeze

Class Method Summary collapse

Methods included from Components::Logger::InstanceMethods

cef_logger, logger

Class Method Details

.application_activityObject



46
47
48
49
50
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 46

def application_activity
  with_rescue do
    NG_ENDPOINTS[:application_activity].cs__freeze
  end
end

.application_inventoryString?

Returns:



40
41
42
43
44
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 40

def application_inventory
  with_rescue do
    "#{ application_endpoint }/inventory".cs__freeze
  end
end

.application_settingsString?

Returns:



33
34
35
36
37
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 33

def application_settings
  with_rescue do
    "#{ application_endpoint }/settings".cs__freeze
  end
end

.application_startupString?

Returns:



26
27
28
29
30
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 26

def application_startup
  with_rescue do
    "#{ application_endpoint }/startup".cs__freeze
  end
end

.effective_configString?

Returns:



87
88
89
90
91
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 87

def effective_config
  with_rescue do
    "#{ application_endpoint }/effective-config".cs__freeze
  end
end

.heartbeatString?

Returns:



60
61
62
63
64
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 60

def heartbeat
  with_rescue do
    "#{ application_endpoint }/heartbeat".cs__freeze
  end
end

.library_usageString?

Returns:



53
54
55
56
57
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 53

def library_usage
  with_rescue do
    "#{ application_endpoint }/library-usage".cs__freeze
  end
end

.observed_routeString?

Returns:



67
68
69
70
71
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 67

def observed_route
  with_rescue do
    "#{ route_endpoint }/observed".cs__freeze
  end
end

.server_settingsObject



73
74
75
76
77
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 73

def server_settings
  with_rescue do
    "#{ server_endpoint }/settings".cs__freeze
  end
end

.trace_observedString?

Returns:



80
81
82
83
84
# File 'lib/contrast/agent/reporting/reporting_utilities/endpoints.rb', line 80

def trace_observed
  with_rescue do
    "#{ trace_endpoint }/observed".cs__freeze
  end
end