Module pipelines.utils.elasticsearch_metrics.utils
Utilities for handling metrics with Elasticsearch
Functions
def format_document(*, flow_name: str = None, labels: List[str] = None, event_type: str = None, dataset_id: str = None, table_id: str = None, metrics: Dict[str, Any] = None) ‑> dict
-
Formats a document in a well-defined format for our Elasticsearch index
def get_elasticsearch_client(es_config_secret_path: str = 'elasticsearch-config') ‑> elasticsearch.Elasticsearch
-
Get an Elasticsearch client with configuration from Vault
def index_document(document: dict, es_client: elasticsearch.Elasticsearch = None, index: str = 'prefect-dados-rio') ‑> dict
-
Indexes a document in Elasticsearch