Google.Cloud.Logging.Nlog - Log correlation with traces
See original GitHub issueHi!
Is your feature request related to a problem? Please describe.
I can’t correlate stackdriver logs in the tracing panel inside the google console.
I think that’s because of the lack of fields like trace, traceId mentioned here https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
I tried to find in code place where LogEntry is filled and eg. field trace exist, but it’s skipped at GoogleStackdriverTarget during object creation.
var logEntry = new LogEntry { Severity = s_levelMap[loggingEvent.Level], Timestamp = ConvertToTimestamp(loggingEvent.TimeStamp), LogName = _logName, Resource = _resource, };
And at other places, algorithm flow fills labels, resources section, and nothing else.
Describe the solution you’d like Giving the possibility to fill LogEntry fields required for tracing.
If it’s possible to then sorry for asking. However, in this case, documentation should be updated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (20 by maintainers)
This has been released in Google.Cloud.Logging.NLog v3.3.0. Thanks @orchowski for the request and @snakefoot for the work!
@snakefoot Thanks for the idea, I implemented your recommendation but have some suggestions for future reference:
layout
we should usevalue
in thevariable
definition@amanda-tarafa Thank you for all your support around here. I just wanted to add that it was really hard for me to wire everything together. It would be nice if there would be a bit more documentation on how to connect google logging and tracing, e.g. on the google nlog package some information on how to use the google tracing header.