Replies: 1 comment
-
Hello, I haven't personally worked on this but since this is a specific protocol, I assume that we're exporting the datetime in accordance with the OTLP spec. https://opentelemetry.io/docs/specs/otlp/ If you find evidence that we're not following the spec, that would be a bug and should be reviewed. Otherwise I don't think we would take allow any customizations. As a workaround, you could convert the datetime to a string with the granularity you need. Would that work for you? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling to find a way to change datetime format when logs are exported with OpenTelemetry.Exporter.OpenTelemetryProtocol.
what i found so far is that all types besides numbers, strings, chars are converted to string using InvariantCulture and i didn't find any way to override this logic, like providing custom IFormatProvider or type specific serializer which would convert datetime to unixTs
I log some stuff like this using default ILogger
And in Loki dt is exported as
MM/dd/yyyy HH:mm:ss
which is not granular enough for me.Any suggestions will be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions