Skip to content

[chore] Update otelopscol to v0.159.0 - #2388

Merged
franciscovalentecastro merged 26 commits into
masterfrom
fcovalente-otelopscol-v0.156.0
Aug 28, 2026
Merged

[chore] Update otelopscol to v0.159.0#2388
franciscovalentecastro merged 26 commits into
masterfrom
fcovalente-otelopscol-v0.156.0

Conversation

@franciscovalentecastro

@franciscovalentecastro franciscovalentecastro commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

Update otelopscol to v0.159.0 and fix some timestamp parsing bugs in 3rd party apps.

Details :

Related issue

How has this been tested?

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

Comment thread apps/couchbase.go Outdated
Parser: confgenerator.ParserShared{
TimeKey: "timestamp",
TimeFormat: "%Y-%m-%dT%H:%M:%S.%L",
TimeFormat: "%Y-%m-%dT%H:%M:%S.%LZ",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you want %z to parse this as UTC, or else it will be parsed as a local time, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right.

This also gives me insight that fluent-bit doesn't "fail to parse" a timestamp that has a "suffix" that is not within the described format. Being a bit more lenient that way.

Comment thread apps/postgresql.go
Parser: confgenerator.ParserShared{
TimeKey: "time",
TimeFormat: "%Y-%m-%d %H:%M:%S.%L %z",
TimeFormat: "%Y-%m-%d %H:%M:%S.%L %Z",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a fun one. strptime's %z is documented as "An RFC-822/ISO 8601 standard timezone specification. RFC-822 allows "UT" / "GMT" / "EST" / "EDT" / "CST" / "CDT" / "MST" / "MDT" / "PST" / "PDT" / 1ALPHA. ISO 8601 allows only Z or ±nn:nn. Notably absent from this list is UTC.

I added a test using UT, and glibc's strptime actually does not parse UT or GMT as valid %z specifiers.

So I'm convinced that %Z is indeed the correct specifier for these logs, and the fact that %z worked with Fluent Bit was a happy accident.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great!

Comment thread confgenerator/logging_receivers.go Outdated
Comment on lines +961 to +962
formattedTime := ottl.FormatTime(ottl.ToTime(v, "%Y-%m-%dT%T.%sZ"), "%Y-%m-%d %T.%s")
return v.Set(ottl.Concat([]ottl.Value{formattedTime, ottl.StringLiteral("+0000")}, " "))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm, is this guaranteed to actually produce a UTC time? Should we actually just be formatting with %z instead?

@franciscovalentecastro franciscovalentecastro Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We were creating timestamps for Windows Event Logs using the output format "%Y-%m-%d %T.%s +0000", which i assume because the fluent-bit windows event logs were always using UTC in the format +0000.

I set %z (which translates to Golang Z0700) which generates Z instead. I think this is better. We could somehow hack the format to %z -> 0700 to get +0000 but it doesn't seem worth it.

The original PR (#1969) i assume was trying to replicate exactly what Windows Event Logs API returns (AFAIU, xml logs are stored always with UTC 1 ) and how fluent-bit event logs timestamps are displayed.

Footnotes

  1. https://superuser.com/questions/1531591/what-time-zone-does-windows-event-logs-show

@LujieDuan

Copy link
Copy Markdown
Contributor

fyi: found another issue with 0.156.0 that we will have to update: PR 2395 - Adding aggregation_type for combine

@franciscovalentecastro

Copy link
Copy Markdown
Contributor Author

fyi: found another issue with 0.156.0 that we will have to update: PR 2395 - Adding aggregation_type for combine

Acknowledge! I was intending to update to 0.158.0 anyways. We can't update to 156 since it's missing the timestamp parsing fix. This PR hacks the fix, but it was released in 158.

@franciscovalentecastro franciscovalentecastro changed the title [Draft] Update otelopscol to v0.156.0 [chore] Update otelopscol to v0.159.0 Aug 26, 2026
@franciscovalentecastro
franciscovalentecastro force-pushed the fcovalente-otelopscol-v0.156.0 branch from f394007 to 23a4853 Compare August 26, 2026 15:19
@franciscovalentecastro
franciscovalentecastro force-pushed the fcovalente-otelopscol-v0.156.0 branch from 7a2b046 to 0abaaeb Compare August 26, 2026 20:58
@franciscovalentecastro
franciscovalentecastro force-pushed the fcovalente-otelopscol-v0.156.0 branch from 92c9017 to 495660b Compare August 27, 2026 16:47
@franciscovalentecastro
franciscovalentecastro merged commit 05c0f2f into master Aug 28, 2026
83 of 86 checks passed
@franciscovalentecastro
franciscovalentecastro deleted the fcovalente-otelopscol-v0.156.0 branch August 28, 2026 15:07
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.

3 participants