DataDog / serilog-sinks-datadog-logs

Serilog Sink that sends log events to Datadog https://www.datadoghq.com/
Apache License 2.0
62 stars 42 forks source link

Template string interpolation not working in latest release #19

Closed garrardkitchen closed 4 years ago

garrardkitchen commented 5 years ago

Dear DD Team,

Since PR #3 (https://github.com/DataDog/serilog-sinks-datadog-logs/pull/3) and latest release, https://github.com/DataDog/serilog-sinks-datadog-logs/issues/5 is no longer fixed.

I've included a screenshot here showing PR #3 producing the last 5 log entries and the latest 0.1.5 producing the other log entries:

image

This screenshot shows is #5 not working:

image

Warmest regards,

Garrard.

achntrl commented 5 years ago

Hi @garrardkitchen,

Thank you for your bug report, we will look into this and I'll get back to you!

achntrl commented 5 years ago

@garrardkitchen, I can't replicate your problem, with the example from the doc

public static void Main(string[] args)
        {
            var log = new LoggerConfiguration()
                .WriteTo.DatadogLogs("<API_KEY>")
                .WriteTo.Console()
                .CreateLogger();

            // An example
            var position = new { Latitude = 25, Longitude = 134 };
            var elapsedMs = 34;

            log.Information("Processed {@Position} in {Elapsed:000} ms.", position, elapsedMs);
            System.Threading.Thread.Sleep(10000);
        }

image

Even if I use the same source/service tags as you. Can you please confirm that you have the 0.1.5 ? A good way of validating this is to change the log line to:

log.Warning("Processed {@Position} in {Elapsed:000} ms.", position, elapsedMs);

and see if the logs appears as a Warning log on the log explorer.

And can you please share with us the code you're trying ?

garrardkitchen commented 5 years ago

Hi @achntrl ,

Thanks for looking into this!

I've run it again for you.

Here's the log output:

image

Here's the binary version (& deps) and sample code:

image

These are my observations:

Thanks for helping.

Garrard

achntrl commented 5 years ago

Hi @garrardkitchen,

I couldn't replicate the problem on my machine. Could you please open a ticket with our support team referencing this issue ?

Thanks, Alexandre

ogaca-dd commented 4 years ago

Hi @garrardkitchen,

Do you still have the issue?

garrardkitchen commented 4 years ago

Hi @ogaca-dd , I'm no longer using this.

ogaca-dd commented 4 years ago

Hi @garrardkitchen,

Thanks for your quick answer.