Sha256: b83f83e7f5e85ece24063c2fcd7f866c56dbea4e9d2310f8a7ac57bd8919eea7
Contents?: true
Size: 1.06 KB
Versions: 20
Compression:
Stored size: 1.06 KB
Contents
# Update a span-based metric returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::SpansMetricsAPI.new # there is a valid "spans_metric" in the system SPANS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY = ENV["SPANS_METRIC_DATA_ATTRIBUTES_FILTER_QUERY"] SPANS_METRIC_DATA_ID = ENV["SPANS_METRIC_DATA_ID"] body = DatadogAPIClient::V2::SpansMetricUpdateRequest.new({ data: DatadogAPIClient::V2::SpansMetricUpdateData.new({ attributes: DatadogAPIClient::V2::SpansMetricUpdateAttributes.new({ compute: DatadogAPIClient::V2::SpansMetricUpdateCompute.new({ include_percentiles: false, }), filter: DatadogAPIClient::V2::SpansMetricFilter.new({ query: "@http.status_code:200 service:my-service-updated", }), group_by: [ DatadogAPIClient::V2::SpansMetricGroupBy.new({ path: "resource_name", tag_name: "resource_name", }), ], }), type: DatadogAPIClient::V2::SpansMetricType::SPANS_METRICS, }), }) p api_instance.update_spans_metric(SPANS_METRIC_DATA_ID, body)
Version data entries
20 entries across 20 versions & 1 rubygems