Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Geneva] DateTime in env_properties are not serialized properly #1162

Closed
1 of 2 tasks
vidommet opened this issue Apr 26, 2023 · 3 comments
Closed
1 of 2 tasks

[Geneva] DateTime in env_properties are not serialized properly #1162

vidommet opened this issue Apr 26, 2023 · 3 comments
Labels
comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva

Comments

@vidommet
Copy link

Issue with OpenTelemetry.Exporter.Geneva

List of all OpenTelemetry NuGet
packages
and version that you are
using (e.g. OpenTelemetry 1.3.2):

<PackageReference Include="OpenTelemetry.Exporter.Geneva" Version="1.4.1" />

Runtime version (e.g. net462, net48, net6.0, net7.0 etc. You can
find this information from the *.csproj file):

net6.0

Is this a feature request or a bug?

  • Feature Request
  • Bug

What is the expected behavior?

Proper serialization of DateTime if not in custom fields. (part of env_properties)

What is the actual behavior?

Output is EXT(type:-1,size:12)

Additional Context

DateTime serialization works as expected if using custom columns but doesn't work if using env_properties.

Consider logger.LogInformation("Test {body}", DateTime.UtcNow);

This works if using

lo.AddGenevaLogExporter(c =>
{
    c.ConnectionString = "EtwSession=OpenTelemetry";
});

But doesn't if using

lo.AddGenevaLogExporter(c =>
{
    c.CustomFields = Array.Empty<string>();
    c.ConnectionString = "EtwSession=OpenTelemetry";
});
@vidommet vidommet added the comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva label Apr 26, 2023
@utpilla utpilla closed this as completed May 9, 2023
@chenxinyanc
Copy link

I'm observing similar issue and found this thread gets closed. Is there any suggestion except from explicitly setting the CustomFields? We don't want to expand our custom dimensions into a lot of columns in Geneva, so we'd prefer leveraging env_properties to collect them together into 1 column. However, We found that DateTime could not be serialized properly in the same fashion as this issue has described.

@zhongyehong
Copy link

Hey @utpilla @chenxinyanc , would like to know any update on this? We are facing the same issues, can we configure to avoid this? Thank you so much

@utpilla
Copy link
Contributor

utpilla commented Dec 19, 2024

Is there any suggestion except from explicitly setting the CustomFields?

@chenxinyanc @zhongyehong You could call .ToString() on the DateTime field while logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva
Projects
None yet
Development

No branches or pull requests

4 participants