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

[otelcol] Tell all loggers to encode timestamps in ISO8601. #10543

Conversation

igorpeshansky
Copy link
Contributor

Description

OTel collector log messages in Windows are currently displayed in scientific notation, e.g.:

1.7194132367192364e+09  error   scraperhelper/scrapercontroller.go:197  Error scraping metrics  …

This fix will cause the log messages to use ISO8601 timestamps instead.

Testing

Manual testing.

Documentation

The previous behavior was undocumented, so no documentation changes needed.

@igorpeshansky igorpeshansky requested review from a team and codeboten July 4, 2024 19:17
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 19, 2024
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Aug 2, 2024
@djaglowski djaglowski reopened this Aug 6, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.45%. Comparing base (c52d625) to head (f050a5e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10543   +/-   ##
=======================================
  Coverage   91.45%   91.45%           
=======================================
  Files         447      447           
  Lines       23721    23723    +2     
=======================================
+ Hits        21694    21696    +2     
  Misses       1653     1653           
  Partials      374      374           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@djaglowski djaglowski removed the Stale label Aug 7, 2024
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

LGTM. Please add a changelog entry. IMO this is best documented as a breaking change since it may affect users who are consuming the collector's logs.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 27, 2024
@github-actions github-actions bot removed the Stale label Aug 28, 2024
Copy link
Contributor

github-actions bot commented Oct 6, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 6, 2024
@igorpeshansky
Copy link
Contributor Author

Sorry, still planning to work on this.

@igorpeshansky igorpeshansky requested a review from a team as a code owner October 16, 2024 16:25
@github-actions github-actions bot removed the Stale label Oct 19, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 17, 2024
@djaglowski djaglowski added ready-to-merge Code review completed; ready to merge by maintainers and removed Stale ready-to-merge Code review completed; ready to merge by maintainers labels Dec 2, 2024
@djaglowski djaglowski added the ready-to-merge Code review completed; ready to merge by maintainers label Dec 2, 2024
@codeboten codeboten merged commit b9ff1bc into open-telemetry:main Dec 2, 2024
68 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 2, 2024
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this pull request Dec 19, 2024
…emetry#10543)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
OTel collector log messages in Windows are currently displayed in
scientific notation, e.g.:
```
1.7194132367192364e+09  error   scraperhelper/scrapercontroller.go:197  Error scraping metrics  …
```
This fix will cause the log messages to use ISO8601 timestamps instead.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Manual testing.

<!--Describe the documentation added.-->
#### Documentation
The previous behavior was undocumented, so no documentation changes
needed.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants