-
Notifications
You must be signed in to change notification settings - Fork 469
ci(llmobs): start to replace some api calls in tests with testagent vcr proxy calls instead #14507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ceac5dc
initial fixes
sabrenner 4c49366
Merge branch 'main' of github.com:DataDog/dd-trace-py into sabrenner/…
sabrenner b7884f6
evaluator runner test
sabrenner 6dd1dac
fmt
sabrenner b5bcc24
Merge branch 'main' of github.com:DataDog/dd-trace-py into sabrenner/…
sabrenner a12e63e
remove todo
sabrenner 48c6385
fixes
sabrenner b0145f7
review suggestions
sabrenner 246057b
Merge branch 'main' into sabrenner/fix-flaky-llmobs-tests
sabrenner 8cbe231
remove newline
sabrenner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_1218a393.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "12345678901", "trace_id": "98765432101"}}, "metric_type": | ||
| "categorical", "categorical_value": "very", "label": "toxicity", "ml_app": "dummy-ml-app", | ||
| "timestamp_ms": 1756910127022}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '283' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"data":{"id":"1ef94721-392d-4612-ad63-5f3b289c1cd5","type":"evaluation_metric","attributes":{"metrics":[{"id":"-Xbd-WStY2","join_on":{"span":{"trace_id":"98765432101","span_id":"12345678901"}},"timestamp_ms":1756910127022,"ml_app":"dummy-ml-app","metric_type":"categorical","label":"toxicity","categorical_value":"very"}]}}}' | ||
| headers: | ||
| content-length: | ||
| - '325' | ||
| content-security-policy: | ||
| - frame-ancestors 'self'; report-uri https://logs.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pube4f163c23bbf91c16b8f57f56af9fc58&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=site%3Adatadoghq.com | ||
| content-type: | ||
| - application/vnd.api+json | ||
| date: | ||
| - Wed, 03 Sep 2025 14:41:13 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| vary: | ||
| - Accept-Encoding | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-frame-options: | ||
| - SAMEORIGIN | ||
| status: | ||
| code: 202 | ||
| message: Accepted | ||
| version: 1 |
43 changes: 43 additions & 0 deletions
43
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_2d529580.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "123", "trace_id": "1234"}}, "label": "dummy", "metric_type": | ||
| "score", "timestamp_ms": 1757074814754, "score_value": 1.0, "ml_app": "unnamed-ml-app", | ||
| "tags": ["ddtrace.version:3.13.0.dev56+gf40756451.d20250822", "ml_app:unnamed-ml-app"]}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '340' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"status":"error","code":403,"errors":["Forbidden"],"statuspage":"http://status.datadoghq.com","twitter":"http://twitter.com/datadogops","email":"support@datadoghq.com"}' | ||
| headers: | ||
| connection: | ||
| - close | ||
| content-length: | ||
| - '169' | ||
| content-type: | ||
| - application/json | ||
| date: | ||
| - Fri, 05 Sep 2025 12:20:14 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| x-content-type-options: | ||
| - nosniff | ||
| status: | ||
| code: 403 | ||
| message: Forbidden | ||
| version: 1 |
47 changes: 47 additions & 0 deletions
47
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_3ef3a86e.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "12345678902", "trace_id": "98765432102"}}, "metric_type": | ||
| "score", "label": "sentiment", "score_value": 0.9, "ml_app": "dummy-ml-app", | ||
| "timestamp_ms": 1756910127022}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '269' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"data":{"id":"c7ca5837-c593-4973-aefc-fe9ccbca1e74","type":"evaluation_metric","attributes":{"metrics":[{"id":"BKrS9Vc9nU","join_on":{"span":{"trace_id":"98765432102","span_id":"12345678902"}},"timestamp_ms":1756910127022,"ml_app":"dummy-ml-app","metric_type":"score","label":"sentiment","score_value":0.9}]}}}' | ||
| headers: | ||
| content-length: | ||
| - '311' | ||
| content-security-policy: | ||
| - frame-ancestors 'self'; report-uri https://logs.browser-intake-datadoghq.com/api/v2/logs?dd-api-key=pube4f163c23bbf91c16b8f57f56af9fc58&dd-evp-origin=content-security-policy&ddsource=csp-report&ddtags=site%3Adatadoghq.com | ||
| content-type: | ||
| - application/vnd.api+json | ||
| date: | ||
| - Wed, 03 Sep 2025 14:45:25 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| vary: | ||
| - Accept-Encoding | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-frame-options: | ||
| - SAMEORIGIN | ||
| status: | ||
| code: 202 | ||
| message: Accepted | ||
| version: 1 |
43 changes: 43 additions & 0 deletions
43
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_42090a9a.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "123", "trace_id": "1234"}}, "label": "dummy", "metric_type": | ||
| "score", "timestamp_ms": 1756911917780, "score_value": 1.0, "ml_app": "unnamed-ml-app", | ||
| "tags": ["ddtrace.version:3.13.0.dev56+gf40756451.d20250822", "ml_app:unnamed-ml-app"]}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '340' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"status":"error","code":403,"errors":["Forbidden"],"statuspage":"http://status.datadoghq.com","twitter":"http://twitter.com/datadogops","email":"support@datadoghq.com"}' | ||
| headers: | ||
| connection: | ||
| - close | ||
| content-length: | ||
| - '169' | ||
| content-type: | ||
| - application/json | ||
| date: | ||
| - Wed, 03 Sep 2025 15:05:17 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| x-content-type-options: | ||
| - nosniff | ||
| status: | ||
| code: 403 | ||
| message: Forbidden | ||
| version: 1 |
43 changes: 43 additions & 0 deletions
43
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_9ef24d1e.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "12345678901", "trace_id": "98765432101"}}, "metric_type": | ||
| "categorical", "categorical_value": "wrong-api-key", "label": "api-key", "ml_app": | ||
| "dummy-ml-app", "timestamp_ms": 1756910127022}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '291' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"status":"error","code":403,"errors":["Forbidden"],"statuspage":"http://status.datadoghq.com","twitter":"http://twitter.com/datadogops","email":"support@datadoghq.com"}' | ||
| headers: | ||
| connection: | ||
| - close | ||
| content-length: | ||
| - '169' | ||
| content-type: | ||
| - application/json | ||
| date: | ||
| - Wed, 03 Sep 2025 14:39:21 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| x-content-type-options: | ||
| - nosniff | ||
| status: | ||
| code: 403 | ||
| message: Forbidden | ||
| version: 1 |
43 changes: 43 additions & 0 deletions
43
...obs/llmobs_cassettes/datadog/datadog_api_intake_llm-obs_v2_eval-metric_post_ca2bfa88.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"data": {"type": "evaluation_metric", "attributes": {"metrics": [{"join_on": | ||
| {"span": {"span_id": "123", "trace_id": "1234"}}, "label": "dummy", "metric_type": | ||
| "score", "timestamp_ms": 1757074518879, "score_value": 1.0, "ml_app": "unnamed-ml-app", | ||
| "tags": ["ddtrace.version:3.13.0.dev56+gf40756451.d20250822", "ml_app:unnamed-ml-app"]}]}}}' | ||
| headers: | ||
| Accept: | ||
| - '*/*' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Accept-Encoding | ||
| : - identity | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '340' | ||
| ? !!python/object/apply:multidict._multidict.istr | ||
| - Content-Type | ||
| : - application/json | ||
| User-Agent: | ||
| - python-requests/2.32.4 | ||
| method: POST | ||
| uri: https://api.datadoghq.com/api/intake/llm-obs/v2/eval-metric | ||
| response: | ||
| body: | ||
| string: '{"status":"error","code":403,"errors":["Forbidden"],"statuspage":"http://status.datadoghq.com","twitter":"http://twitter.com/datadogops","email":"support@datadoghq.com"}' | ||
| headers: | ||
| connection: | ||
| - close | ||
| content-length: | ||
| - '169' | ||
| content-type: | ||
| - application/json | ||
| date: | ||
| - Fri, 05 Sep 2025 12:15:18 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| x-content-type-options: | ||
| - nosniff | ||
| status: | ||
| code: 403 | ||
| message: Forbidden | ||
| version: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.