5.1. Error time parser: failed to load location MSK #

pgpro-otel-collector may fail to parse timestamps with the MSK time zone in the following configuration:

timestamp:
  layout: '%Y-%m-%d %H:%M:%S.%L %Z'
  layout_type: strptime
  parse_from: attributes.timestamp

To fix the issue, use one of the following workarounds:

  • Specify the Europe/Moscow time zone explicitly:

    timestamp:
      parse_from: attributes.timestamp
      layout_type: strptime
      layout: '%Y-%m-%d %H:%M:%S.%L %Z'
      location: Europe/Moscow
    
  • Provide a time zone mapping for MSK:

    timestamp:
      parse_from: attributes.timestamp
      layout_type: strptime
      layout: '%Y-%m-%d %H:%M:%S.%L %Z'
      time_zone_locations:
        MSK: Europe/Moscow
    
  • Use the Go time format (gotime):

    timestamp:
      parse_from: attributes.timestamp
      layout_type: gotime
      layout: '2006-01-02 15:04:05.999 MST'