Class: Wavefront::Spy
Overview
Spy on data going into Wavefront
Instance Attribute Summary
Attributes inherited from CoreApi
#api, #creds, #logger, #opts, #update_keys
Instance Method Summary collapse
-
#_response_shim(resp, status) ⇒ Object
We have to try to make the response we get from the API look like the one we get from the public API.
- #api_path ⇒ Object
-
#histograms(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/histograms Gets new histograms that are added to existing time series.
-
#ids(sampling = 0.01, filters = {}, options = {}) ⇒ Object
GET /api/spy/ids Gets newly allocated IDs that correspond to new metric names, source names, point tags, or span tags.
-
#points(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/points Gets new metric data points that are added to existing time series.
-
#spans(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/spans Gets new spans with existing source names and span tags.
Methods inherited from CoreApi
#api_base, #hash_for_update, #initialize, #setup_api, #time_to_ms
Methods included from Mixins
#log, #parse_relative_time, #parse_time, #relative_time, #time_multiplier, #valid_relative_time?
Methods included from Validators
#uuid?, #wf_account_id?, #wf_alert_id?, #wf_alert_severity?, #wf_apitoken_id?, #wf_aws_external_id?, #wf_cloudintegration_id?, #wf_dashboard_id?, #wf_derivedmetric_id?, #wf_distribution?, #wf_distribution_count?, #wf_distribution_interval?, #wf_distribution_values?, #wf_epoch?, #wf_event_id?, #wf_granularity?, #wf_ingestionpolicy_id?, #wf_integration_id?, #wf_link_id?, #wf_link_template?, #wf_maintenance_window_id?, #wf_message_id?, #wf_metric_name?, #wf_monitoredcluster_id?, #wf_ms_ts?, #wf_name?, #wf_notificant_id?, #wf_permission?, #wf_point?, #wf_point_tag?, #wf_point_tags?, #wf_proxy_id?, #wf_role_id?, #wf_sampling_value?, #wf_savedsearch_entity?, #wf_savedsearch_id?, #wf_serviceaccount_id?, #wf_source_id?, #wf_string?, #wf_tag?, #wf_ts?, #wf_user_id?, #wf_usergroup_id?, #wf_value?, #wf_version?, #wf_webhook_id?
Constructor Details
This class inherits a constructor from Wavefront::CoreApi
Instance Method Details
#_response_shim(resp, status) ⇒ Object
We have to try to make the response we get from the API look like the one we get from the public API. To begin with, it’s nothing like it.
This method must be public because a #respond_to? looks for it.
90 91 92 93 94 95 |
# File 'lib/wavefront-sdk/spy.rb', line 90 def _response_shim(resp, status) { response: parse_response(resp), status: { result: status == 200 ? 'OK' : 'ERROR', message: (status, resp), code: status } }.to_json end |
#api_path ⇒ Object
79 80 81 |
# File 'lib/wavefront-sdk/spy.rb', line 79 def api_path '/api/spy' end |
#histograms(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/histograms Gets new histograms that are added to existing time series.
43 44 45 46 47 48 |
# File 'lib/wavefront-sdk/spy.rb', line 43 def histograms(sampling = 0.01, filters = {}, = {}) wf_sampling_value?(sampling) api.get_stream('histograms', histograms_filter(sampling, filters), ) end |
#ids(sampling = 0.01, filters = {}, options = {}) ⇒ Object
GET /api/spy/ids Gets newly allocated IDs that correspond to new metric names, source names, point tags, or span tags. A new ID generally indicates that a new time series has been introduced.
74 75 76 77 |
# File 'lib/wavefront-sdk/spy.rb', line 74 def ids(sampling = 0.01, filters = {}, = {}) wf_sampling_value?(sampling) api.get_stream('ids', ids_filter(sampling, filters), ) end |
#points(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/points Gets new metric data points that are added to existing time series.
30 31 32 33 |
# File 'lib/wavefront-sdk/spy.rb', line 30 def points(sampling = 0.01, filters = {}, = {}) wf_sampling_value?(sampling) api.get_stream('points', points_filter(sampling, filters), ) end |
#spans(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
GET /api/spy/spans Gets new spans with existing source names and span tags.
58 59 60 61 |
# File 'lib/wavefront-sdk/spy.rb', line 58 def spans(sampling = 0.01, filters = {}, = {}) wf_sampling_value?(sampling) api.get_stream('spans', spans_filter(sampling, filters), ) end |