Skip to content

#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
fix/skruk/events_payload
Oct 24, 2025
Merged

#6 fixing generic and davis events, and the use of the latter in the telemetry sender#17
sebastiankruk merged 1 commit intorelease/0.9.2from
fix/skruk/events_payload

Conversation

@sebastiankruk
Copy link
Collaborator

#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

@sebastiankruk sebastiankruk requested a review from Copilot October 23, 2025 18:57
@sebastiankruk sebastiankruk self-assigned this Oct 23, 2025
@sebastiankruk sebastiankruk added the bug Something isn't working label Oct 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 properties key 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.

@sebastiankruk sebastiankruk merged commit a255268 into release/0.9.2 Oct 24, 2025
6 checks passed
@sebastiankruk sebastiankruk deleted the fix/skruk/events_payload branch October 24, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants