#6 fixing generic and davis events, and the use of the latter in the telemetry sender#17
Merged
sebastiankruk merged 1 commit intorelease/0.9.2from Oct 24, 2025
Merged
Conversation
…telemetry sender
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the event payload structure for generic and Davis events. Previously, event metadata (eventType, title) appeared at the top level with event data nested under a properties key. The new structure flattens generic events by placing all fields at the same level, while Davis events maintain the properties wrapper for event data but with metadata (eventType, title) at the top level alongside status.code.
Key changes:
- Generic events now send event data directly in the payload (flattened structure)
- Davis events send event data under
propertieskey with metadata at top level - Added
_add_data_to_payload()method to handle the different payload structures - Fixed telemetry sender to properly handle Davis events
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/test_results/*/events.json | Updated test expectations to reflect flattened event structure for generic events |
| test/test_results/test_automode/010/davis_events.json | New test expectations for Davis events with nested properties structure |
| test/test_results/test_automode/010/logs.json | Updated to track davis_events count |
| test/core/test_connector.py | Updated test assertion to verify Davis events are sent |
| src/dtagent/otel/events/generic.py | Refactored to use _add_data_to_payload() for flattened structure |
| src/dtagent/otel/events/davis.py | Implemented _add_data_to_payload() to wrap event data under properties |
| src/dtagent/connector.py | Added is_data_structured=False parameter and support for davis as alias |
| CHANGELOG.md | Fixed reference from DT_TOKEN to DTAGENT_TOKEN |
| ARCHITECTURE.md | Updated documentation for parameter names and return values |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dorian-krefft-dt
approved these changes
Oct 24, 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.
#6 generic and davis events now send the payload correctly, directly and under the properties key accordingly; plus fixing how we send davis events with the telemetry sender