Fix Datadog log-query to use Logs API instead of Error Tracking API#1043
Merged
Fix Datadog log-query to use Logs API instead of Error Tracking API#1043
Conversation
- Changed log-query mode from Error Tracking API to Logs Search API - Error Tracking API only searches pre-indexed error issues, not arbitrary text - Logs API properly searches log content by text queries - Updated request format to use filter/page/sort structure for Logs API - Updated response parsing to extract log entry fields (message, service, host, etc.) - Fixes issue where text-based queries returned zero examples Co-authored-by: openhands <openhands@all-hands.dev>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Co-authored-by: openhands <openhands@all-hands.dev>
neubig
commented
Nov 5, 2025
examples/03_github_workflows/04_datadog_debugging/datadog_debugging.py
Outdated
Show resolved
Hide resolved
xingyaoww
approved these changes
Nov 6, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The Datadog debugging workflow was downloading zero examples when using text-based queries.
Example from issue #5:
Query
"or as a global setting instead"returned"total_examples": 0Root Cause
The script was using the Datadog Error Tracking API for
log-querymode:https://api.{dd_site}/api/v2/error-tracking/issues/search{"data": []}Solution
Changed the
log-querymode to use the Datadog Logs Search API:https://api.{dd_site}/api/v2/logs/events/searchChanges Made
Modified
examples/03_github_workflows/04_datadog_debugging/datadog_debugging.py:Testing
Tested with the same query from issue #5:
"or as a global setting instead"Impact
This fix ensures that text-based log queries return actual log examples, making the Datadog debugging workflow functional for text searches.
@neubig can click here to continue refining the PR
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.12-nodejs22golang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:d1e6ad9-pythonRun
All tags pushed for this build
About Multi-Architecture Support
d1e6ad9-python) is a multi-arch manifest supporting both amd64 and arm64d1e6ad9-python-amd64) are also available if needed