[azure] signinlogs: use createdDateTime as @timestamp#20287
Draft
zmoog wants to merge 4 commits into
Draft
Conversation
For SignInLogs, `properties.createdDateTime` is the actual sign-in event time, while the top-level `time` field is a processing timestamp that arrives slightly later. When `createdDateTime` is present, use it for `@timestamp`; fall back to `time` for events that only carry that field. Adds a test fixture covering both cases (createdDateTime present vs absent). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
zmoog
force-pushed
the
azure-signinlogs-created-datetime-timestamp
branch
from
July 22, 2026 16:12
1f9f751 to
8ea260a
Compare
zmoog
marked this pull request as draft
July 22, 2026 16:44
For the sign-in logs the `createdDateTime` field seems the expected log event time.
Also shorten the set processor description; the comment above it already carries the full explanation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Elastic Docs Style Checker (Vale)Summary: 1 suggestion found 💡 Suggestions (1): Optional style improvements. Apply when helpful.
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
Contributor
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
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.
Summary
SignInLogs,properties.createdDateTimeis the actual sign-in event time. The top-leveltimefield is a processing timestamp that arrives slightly later (typically 1–2 minutes after the real event).properties.createdDateTimeis present, it now overrides@timestamp; events that only carrytimefall back to the existing behavior unchanged.Implementation
A single
setprocessor withcopy_fromandoverride: trueoverwritesazure.signinlogs.timewithproperties.created_date_timewhen present, right before the existingdateprocessor. Thedateprocessor then handles both cases unchanged, keeping the fallback implicit with no branching logic.Testing
test-created-datetime-timestamp.log) with two events: one carrying both fields with different values (@timestamp=createdDateTime), and one withtimeonly (@timestamp=time, the fallback path).test-alternative-time-and-duration-as-string, where the two timestamps genuinely differ:@timestampmoves from thetimevalue (01:48:53.000Z) to thecreatedDateTimevalue (01:46:16.428Z).timeandcreatedDateTimevalues represent the same instant.🤖 Generated with Claude Code