Hierarchy

  • UsageMeteringApi

Constructors

Properties

configuration: Configuration
requestFactory: UsageMeteringApiRequestFactory
responseProcessor: UsageMeteringApiResponseProcessor

Methods

  • Get hourly usage attribution. Multi-region data is available starting March 1, 2023.

    This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is set in the response. If it is, make another request and pass next_record_id as a parameter. Pseudo code example:

    response := GetHourlyUsageAttribution(start_month)
    cursor := response.metadata.pagination.next_record_id
    WHILE cursor != null BEGIN
    sleep(5 seconds) # Avoid running into rate limit
    response := GetHourlyUsageAttribution(start_month, next_record_id=cursor)
    cursor := response.metadata.pagination.next_record_id
    END

    The following values have been deprecated: estimated_indexed_spans_usage, estimated_indexed_spans_percentage, estimated_ingested_spans_usage, estimated_ingested_spans_percentage, llm_observability_usage, llm_observability_percentage.

    Parameters

    Returns Promise<HourlyUsageAttributionResponse>

Generated using TypeDoc