-
Notifications
You must be signed in to change notification settings - Fork 369
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
Add labels on a per-log basis to Stackdriver upload via Log4net #5325
Comments
I'll take a look at whether we can do this and how, but just to set expectations, I won't get to it for at least a couple of weeks. |
Any updates? We are running into log query latency issues and using log labels would speed things up dramatically (because they are indexed). |
@williecohen-google: Sorry, not yet - we'll try to have a look next week. |
I'm working on this, will have an update early next week. |
I believe you can already achieve this using properties, custom labels and patterns for custom labels.
The only caveat is that if a property is not set, the pattern will return Let me know if this sounds reasonable to you. |
Ok, I think this sounds reasonable. We have a default label, which we could set at GlobalContext to prevent null values, but it would probably be nice for other use cases to strip nulls out. I'll try this out and see if I run into any issues. Thanks! |
Ok I was able to successfully add log labels with this! I do think for a follow up:
Thanks for looking into this! |
Thanks for confirming that this solves your issue.
I'll keep open until I've added the docs at least. |
…oud log entry labels. Towards googleapis#5325
…oud log entry labels. Towards googleapis#5325
…oud log entry labels. Towards #5325
- Removes googleapis#110, googleapis#803 and googleapis#1038 - Adds googleapis#5325
- Removes googleapis#110, googleapis#803, googleapis#1038 and googleapis#1451 - Adds googleapis#5325
I've added documentation on how to translate Log4Net properties into labels. You can find it here. As for the I'll be closing this issue now since we've done as much as we are planning to do for now, but do please add another comment if you think there's something else we can do. |
Is your feature request related to a problem? Please describe.
I am using Log4net with the GoogleStackdriverAppender in a .NET framework project. I want to be able to add labels to our log entries for Cloud Monitoring. I want to be able to group logs easily using these labels (which is what their purpose seems to be). However, the GoogleStackdriverAppender only allows static custom labels to be added that apply to all logs flowing through the Appender.
Describe the solution you'd like
Ideally there would be a way to attach labels to certain logs, and not just statically for all logs generated. I'm assuming this decision was made to try and "fit" Log4net nicely into the Stackdriver data model, but I would think there would be a way to accommodate per log labels.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: