Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent type to express date & time #660

Open
svrnm opened this issue Jan 19, 2024 · 2 comments
Open

Consistent type to express date & time #660

svrnm opened this issue Jan 19, 2024 · 2 comments
Assignees

Comments

@svrnm
Copy link
Member

svrnm commented Jan 19, 2024

While looking at different semantic conventions I saw that different notations for time are used, i.e. UNIX timestamps as int and formatted date as strings:

| `messaging.rocketmq.message.delivery_timestamp` | int | The timestamp in milliseconds that the delay message is expected to be delivered to consumer. | `1665987217045` |

| `heroku.release.creation_timestamp` | string | Time and date the release was created | `2022-10-23T18:00:42Z` | Opt-In |

| [`messaging.rocketmq.message.delivery_timestamp`](../attributes-registry/messaging.md) | int | The timestamp in milliseconds that the delay message is expected to be delivered to consumer. | `1665987217045` | Conditionally Required: [2] |

| `tls.client.not_after` | string | Date/Time indicating when client certificate is no longer considered valid. | `2021-01-01T00:00:00.000Z` |

I think there should be one consistent way to express those OR at least a _timestamp should be equivalent to a unix timestamp and a _datetime should be a formatted string

@pyohannes
Copy link
Contributor

Good point. ECS supports different representations for date & time, but at least has it clearly documented: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/date.html

@svrnm
Copy link
Member Author

svrnm commented Feb 22, 2024

via #564 (comment) (@jsuereth)

We had some in person discussions in the Specification meeting and the Semconv meeting.
I'm not sure we have consensus here, but I do think we can likely make progress by sticking (consistently) to String-dates in ISO 8601 format in semconv (what you have).

I am wondering where this should be added, from what I see there is no file that describes attribute values in more details, beyond what is in https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/common?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants