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

feat(api-logs): add ObservedTimestamp to LogRecord #3787

Merged
merged 8 commits into from
May 19, 2023

Conversation

llc1123
Copy link
Contributor

@llc1123 llc1123 commented May 8, 2023

Which problem is this PR solving?

Adds ObservedTimestamp to LogRecord according to the specification.

Fixes #3757

Short description of the changes

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Existing tests

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@llc1123 llc1123 marked this pull request as ready for review May 8, 2023 08:47
@llc1123 llc1123 requested a review from a team May 8, 2023 08:47
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #3787 (9c8c5ce) into main (9fe1f7d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 9c8c5ce differs from pull request most recent head aeb3eb8. Consider uploading reports for the commit aeb3eb8 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3787   +/-   ##
=======================================
  Coverage   92.95%   92.95%           
=======================================
  Files         295      295           
  Lines        9038     9039    +1     
  Branches     1842     1843    +1     
=======================================
+ Hits         8401     8402    +1     
  Misses        637      637           
Impacted Files Coverage Δ
...erimental/packages/api-logs/src/types/LogRecord.ts 100.00% <ø> (ø)
...mental/packages/otlp-transformer/src/logs/index.ts 100.00% <ø> (ø)
experimental/packages/sdk-logs/src/LogRecord.ts 97.82% <100.00%> (+0.02%) ⬆️

@llc1123 llc1123 force-pushed the feat/logs-observed-timestamp branch 2 times, most recently from 7af7fbf to 0451321 Compare May 10, 2023 04:34
Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

Generally looks good but you have to be very extra sure you want hrTime if you're going to use it. I personally would recommend using Date.now

experimental/packages/sdk-logs/src/LogRecord.ts Outdated Show resolved Hide resolved
@llc1123 llc1123 force-pushed the feat/logs-observed-timestamp branch from cdb9c72 to 84125dc Compare May 18, 2023 05:11
@dyladan dyladan merged commit de22983 into open-telemetry:main May 19, 2023
@llc1123 llc1123 deleted the feat/logs-observed-timestamp branch May 22, 2023 03:51
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

Successfully merging this pull request may close these issues.

Add ObservedTimestamp to Logs API
5 participants