opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[pkg/ottl] Support for locale

Open michalpristas opened this issue 1 year ago • 1 comments

Component(s)

pkg/ottl

Is your feature request related to a problem? Please describe.

When timestamp is in non-english language normal golang parsing will fail.

example: when the tool i'm observing is producing Italian logs in a form of mercoledì set 4 2024 parsing with a layout Monday Jan 2 2006 should yield 4th September 2024 correctly

Describe the solution you'd like

Depending on https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32977

DoD:

  • Add an ottl.Optional[string] argument to Time converter named locale.
  • Check locale is valid and we have a mapping for it at startup not in expression function
  • Date in non-english locales are parsed correctly
  • Support for different formats e.g stdLongWeekDay, stdWeekDay
  • Unit tests verifying known locales

Describe alternatives you've considered

No response

Additional context

No response

michalpristas avatar May 10 '24 08:05 michalpristas

Pinging code owners:

  • pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar May 10 '24 08:05 github-actions[bot]

Is this closed by https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32140?

TylerHelmuth avatar May 10 '24 19:05 TylerHelmuth

no i extracted it outside of that issue. to be more granular i kept that one about timezones, and this one about locales (languages)

michalpristas avatar May 13 '24 07:05 michalpristas

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • pkg/ottl: @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Jul 15 '24 03:07 github-actions[bot]

This issue has been closed as inactive because it has been stale for 120 days with no activity.

github-actions[bot] avatar Sep 13 '24 05:09 github-actions[bot]