example: datadog_api_client.v2 query_timeseries_data does not work
まだ誰も着手していません。
評価
調査の方向性
examples/v2/metrics/QueryTimeseriesData.py から始め、関連する API キーとアプリケーションキーを使って、提供されている query_timeseries_data の例を実行します。MetricsApi が送信するリクエストと、返される「Invalid query input」エラーを調査します。この例が正常に実行され、記載されている OK レスポンスと一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
A clear and concise description of what the bug is.
when I run test in
https://github.com/DataDog/datadog-api-client-python/blob/master/examples/v2/metrics/QueryTimeseriesData.py
"""
Query timeseries data across multiple products returns "OK" response
"""
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.metrics_api import MetricsApi
from datadog_api_client.v2.model.formula_limit import FormulaLimit
from datadog_api_client.v2.model.metrics_data_source import MetricsDataSource
from datadog_api_client.v2.model.metrics_timeseries_query import MetricsTimeseriesQuery
from datadog_api_client.v2.model.query_formula import QueryFormula
from datadog_api_client.v2.model.query_sort_order import QuerySortOrder
from datadog_api_client.v2.model.timeseries_formula_query_request import TimeseriesFormulaQueryRequest
from datadog_api_client.v2.model.timeseries_formula_request import TimeseriesFormulaRequest
from datadog_api_client.v2.model.timeseries_formula_request_attributes import TimeseriesFormulaRequestAttributes
from datadog_api_client.v2.model.timeseries_formula_request_queries import TimeseriesFormulaRequestQueries
from datadog_api_client.v2.model.timeseries_formula_request_type import TimeseriesFormulaRequestType
body = TimeseriesFormulaQueryRequest(
data=TimeseriesFormulaRequest(
attributes=TimeseriesFormulaRequestAttributes(
formulas=[
QueryFormula(
formula="a+b",
limit=FormulaLimit(
count=10,
order=QuerySortOrder.DESC,
),
),
],
_from=1730518188595,
interval=5000,
queries=TimeseriesFormulaRequestQueries(
[
MetricsTimeseriesQuery(
data_source=MetricsDataSource.METRICS,
query="avg:system.cpu.user{*}",
),
]
),
to=1730604588595,
),
type=TimeseriesFormulaRequestType.TIMESERIES_REQUEST,
),
)
API_KEY= 'XXX'
APP_KEY = 'XXX'
configuration = Configuration()
configuration.api_key["apiKeyAuth"] = API_KEY
configuration.api_key["appKeyAuth"] = APP_KEY
configuration.unstable_operations["query_timeseries_data"] = True
with ApiClient(configuration) as api_client:
api_instance = MetricsApi(api_client)
response = api_instance.query_timeseries_data(body=body)
print(response)
return error: {'errors': ['Invalid query input']}
Label the issue properly.
- Add
severity/label. - Add
documentationlabel if this issue is related to documentation changes.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment and Versions (please complete the following information):
A clear and precise description of your setup:
- version for this project in use.
- services, libraries, languages and tools list and versions.
Additional context
Add any other context about the problem here.
- 主要言語
- Python
- スター
- 166
- フォーク
- 55
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 73
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataDog/datadog-api-client-python のほかの issue
-
stale
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
DataDog/datadog-api-client-python#3535 · コメント 1 件 ·
-
kind/bug stale
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
DataDog/datadog-api-client-python#3717 · コメント 3 件 ·
-
kind/bug stale
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
DataDog/datadog-api-client-python#3656 · コメント 1 件 ·
-
kind/bug stale
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
DataDog/datadog-api-client-python#3120 · コメント 1 件 ·
-
stale
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
DataDog/datadog-api-client-python#2986 · コメント 1 件 ·
DataDog/datadog-api-client-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/skills#1811 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
speaches-ai/speaches#678 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
datalayer/mcp-compose#42 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conda-forge/spacy-feedstock#177 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
UKGovernmentBEIS/inspect_evals#2523 ·