-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Closed
Copy link
Labels
enhancementNew feature or requestNew feature or requestextension/encoding/awslogsencodingpriority:p2MediumMedium
Description
Component(s)
extension/encoding/awslogsencoding
Describe the issue you're reporting
Problem
The awslogsencodingextension currently has no established handling of custom timestamp fields that are not the official record timestamp:
- VPC Flow Logs:
aws.vpc.flow.startfield usesint64(Unix seconds since epoch) - Future timestamp fields: No standard for how custom timestamp fields should be formatted
The official record timestamps are correctly handled as nanoseconds since epoch (OpenTelemetry standard), but custom timestamp fields like aws.vpc.flow.start need a consistent approach.
Current State
| Field | Type | Format | Issue |
|---|---|---|---|
aws.vpc.flow.start |
int64 |
Seconds since epoch | Inconsistent with semconv patterns |
| Record timestamps | int64 |
Nanoseconds since epoch | Correct (OpenTelemetry standard) |
Problem Details
- SemConv patterns: Semantic conventions don't have a way to set a field as a date type. In most existing semconv fields ISO-8601 formatted date is used. Few are also in nanoseconds since epoch
- Consistency: Need a standard for future custom timestamp fields
- Consumer Experience: Integer timestamps are not human-readable. They require additional handling from extension consumers
Proposed Solution
Standard for Custom Timestamp Fields:
- Type:
string - Format: ISO-8601 with millisecond precision
- Pattern:
"2006-01-02T15:04:05.000Z" - Timezone: UTC (indicated by
Zsuffix)
Examples
Current :
{
"timestamp": 1609459200000000000, // Record timestamp (nanoseconds)
"aws.vpc.flow.start": 1609459200 // Custom field (seconds)
}Proposed:
{
"timestamp": 1609459200000000000, // Record timestamp (nanoseconds)
"aws.vpc.flow.start": "2021-01-01T00:00:00.000Z" // Custom field (ISO-8601)
}Decision
After discussions in the issue we decided to go with RFC3339Nano for nanoseconds precision.
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
joecompute, Kavindu-Dodan and axw
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestextension/encoding/awslogsencodingpriority:p2MediumMedium