MonitoredResource logs not showing up under the monitored resource
See original GitHub issueRepro: dotnet build
and dotnet run
here https://github.com/logary/logary/tree/master/src/tests/Logary.Targets.Stackdriver.Tests with another resource here https://github.com/logary/logary/blob/master/src/tests/Logary.Targets.Stackdriver.Tests/Program.fs#L52
In case a more extensive repro is needed; this issue can be to document how to e.g. log to a container resource in GKE; right now this repo only contains tests for the global resource and all that the docs show is the global resource (which does work).
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Writing logs with cloud logging
My objective is to write to a file which is to be created weekly, and i have previously managed to do that. However...
Read more >MonitoredResource - Logging
An object representing a resource that can be used for monitoring, ... of the labels listed in the associated monitored resource descriptor.
Read more >About Cloud Logging - API documentation
CommonResource sets the monitored resource associated with all log entries written from a Logger. If not provided, the resource is automatically detected based ......
Read more >MonitoredResource (Cloud Monitoring API v3 (Rev. 540) ...
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with...
Read more >Troubleshooting Logs
If you are not seeing any logs in the Logs page after you've set up ingestion, it may be caused by incorrect resource...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@haf I’ve ran the following code (basically logary’s own F# Hello World example tweaked to use Stackdriver as a target) and I can confirm that the entry does not appear under Global but under the proper GKE container, and all the labels for the resource have their correct value. That is I can’t reproduce the issue. As you can see the values I used are hard-coded, but I got them from a test cluster I have running on GCP. I ran it with made up values as well, not corresponding to any cluster I have on GCP, and the entry got logged properly under those made up values. So I suspect that your trouble is around how you are getting those values, which might be due to googleapis/gax-dotnet#276 or another issue on our side, or maybe an issue on your side. I haven’t found code on your repo that is trying to obtain that metadata so I cannot tell for sure where the issue might be. If you are able to reproduce it again, please send as a stripped down version of the code as possible so I can take a look. The code I ran:
And the entry correctly logged (sorry for the shapeless red blobs):
I think this might be a symptom of googleapis/gax-dotnet#276 .