-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.19.z
-
None
-
None
-
False
-
-
None
-
Low
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
IHAC where customer wants to configure the `processor.transform` on the log from open telemetry to modify the TZ on the log entries.
So far I've got into this config, however it doesn't work.
"""
transform:
log_statements:
- context: log
statements:
- set(log.attributes["local.timezone.offset"], FormatTime(Time(), "America/Los_Angeles"))
"""
It fails with error:
"""
Dec 09 19:32:32 host opentelemetry-collector[71111]: Error: invalid configuration: processors::transform: unable to parse OTTL statement "set(log.attributes[\"local.timezone.offset\"], FormatTime(Time(), \"America/Los_Angeles\"))": error while parsing arguments for call to "set": invalid argument at position 1: error while parsing arguments for call to "FormatTime": invalid argument at position 0: error while parsing arguments for call to "Time": incorrect number of arguments. Expected: 4 Received: 0
Dec 09 19:32:32 host opentelemetry-collector[71111]: 2025/12/09 19:32:32 collector server run finished with error: invalid configuration: processors::transform: unable to parse OTTL statement "set(log.attributes[\"local.timezone.offset\"], FormatTime(Time(), \"America/Los_Angeles\"))": error while parsing arguments for call to "set": invalid argument at position 1: error while parsing arguments for call to "FormatTime": invalid argument at position 0: error while parsing arguments for call to "Time": incorrect number of arguments. Expected: 4 Received: 0
"""
Seeking for help in this.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info: