Class: Wavefront::Unstable::Spy
- Defined in:
- lib/wavefront-sdk/unstable/spy.rb
Overview
THIS IS AN UNSTABLE CLASS. PLEASE REFER TO README.md.
Everything about this API is different from the public one. To make it appear similar we must change various things we normally take for granted.
This class is built according to the documentation at docs.wavefront.com/wavefront_monitoring_spy.html
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
Gets new histograms that are added to existing time series.
-
#ids(sampling = 0.01, filters = {}, options = {}) ⇒ Object
https://<cluster>.wavefront.com/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
https://<cluster>.wavefront.com/api/spy/points Gets new metric data points that are added to existing time series.
-
#spans(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
https://<cluster>.wavefront.com/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_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_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.
97 98 99 100 101 102 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 97 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
86 87 88 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 86 def api_path '/api/spy' end |
#histograms(sampling = 0.01, filters = {}, options = {}) ⇒ Nil
Gets new histograms that are added to existing time series.
50 51 52 53 54 55 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 50 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
https://<cluster>.wavefront.com/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.
81 82 83 84 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 81 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
https://<cluster>.wavefront.com/api/spy/points Gets new metric data points that are added to existing time series.
38 39 40 41 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 38 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
https://<cluster>.wavefront.com/api/spy/spans Gets new spans with existing source names and span tags.
65 66 67 68 |
# File 'lib/wavefront-sdk/unstable/spy.rb', line 65 def spans(sampling = 0.01, filters = {}, = {}) wf_sampling_value?(sampling) api.get_stream('spans', spans_filter(sampling, filters), ) end |