CTS API

The Cloud Trace Service Class

The CTS high-level interface is available through the cts member of a Connection object. The cts member will only be added if the otcextensions.sdk.register_otc_extensions(conn) method is called.

Trace Operations

class otcextensions.sdk.cts.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
traces(tracker='system', **query)

List all traces

Parameters:
  • tracker – The name or an tracker of Tracker

  • limit – default limit of resources

Returns:

A generator of tracker object of Trace

Trackers Operations

class otcextensions.sdk.cts.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
get_tracker(tracker)

Get detail about a given tracker

Parameters:

tracker – The tracker id, name or an tracker of Tracker

Returns:

one object of class Tracker

create_tracker(**kwargs)

Create a tracker

Parameters:

kwargs (dict) – Keyword arguments which will be used to overwrite a Tracker

update_tracker(tracker, **attrs)

Update tracker with attributes

Parameters:
  • tracker – The value can be the ID of an tracker or a tracker tracker.

  • attrs (dict) – Keyword arguments which will be used to create a tracker, comprised of the properties on the tracker class.

Returns:

The updated tracker

Return type:

tracker

delete_tracker(tracker='system', ignore_missing=True)

Delete a tracker

Parameters:
  • tracker – The value can be the ID of a tracker or a Tracker instance

  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the backup_policy does not exist. When set to True, no exception will be set when attempting to delete a nonexistent backup_policy.

Returns:

tracker been deleted

Return type:

Tracker