Skip to content

Latest commit

 

History

History
223 lines (145 loc) · 18 KB

File metadata and controls

223 lines (145 loc) · 18 KB

MetricsExports

Overview

Available Operations

configure

ConfigureMetricsExport

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.metrics_exports.configure()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
prometheus_enabled Optional[bool] ➖ N/A
otlp_enabled Optional[bool] ➖ N/A
otlp_endpoint Optional[str] ➖ N/A
otlp_headers Optional[str] ➖ N/A
otlp_protocol Optional[str] ➖ N/A
push_interval_seconds Optional[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MetricsExportServiceConfigureMetricsExportResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete_config

DeleteMetricsExportConfig

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.metrics_exports.delete_config(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicMetricsExportDeleteMetricsExportConfigRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MetricsExportServiceDeleteMetricsExportConfigResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_metrics_export_config

GetMetricsExportConfig

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.metrics_exports.get_metrics_export_config(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicMetricsExportGetMetricsExportConfigRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MetricsExportServiceGetMetricsExportConfigResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

test_connection

TestMetricsExportConnection

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.metrics_exports.test_connection()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
otlp_endpoint Optional[str] ➖ N/A
otlp_headers Optional[str] ➖ N/A
otlp_protocol Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MetricsExportServiceTestMetricsExportConnectionResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

trigger_push

TriggerMetricsPush

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.metrics_exports.trigger_push(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicMetricsExportTriggerMetricsPushRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.MetricsExportServiceTriggerMetricsPushResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*