feat: autopopulate GCF metadata#276
Conversation
| } | ||
|
|
||
| // If running on Google Cloud Functions, add labels for the function | ||
| // name, project, and region. |
There was a problem hiding this comment.
Q: We are special casing cloud functions here. Should we also be doing something for GAE and other managed environments? Note that we already do provide some of this information in the resource field of the LogEntry: https://github.com/googleapis/nodejs-logging/blob/34878be64cb4475e364624c5a5ea86d4f809fcff/src/log.ts#L825-L834
There was a problem hiding this comment.
Yes, providing info for GAE would be good too. I was thinking that could be a follow-up PR, but if you think it belongs in this PR, I can add it.
There was a problem hiding this comment.
It would be good to know what kind of logic we need to add. Secondly, is there a way to put this logic in the common logging library rather than here? I expect the logging-bunyan also needs it.
There was a problem hiding this comment.
Yes, I am still investigating what information we should auto-populate from GAE. Yes, putting this in @google-cloud/logging would be better. I'll move this work there.
|
This needs the functionality of PR #278 to be able to add |
Codecov Report
@@ Coverage Diff @@
## master #276 +/- ##
==========================================
- Coverage 92.15% 90.65% -1.51%
==========================================
Files 6 6
Lines 102 107 +5
Branches 18 22 +4
==========================================
+ Hits 94 97 +3
Misses 4 4
- Partials 4 6 +2
Continue to review full report at Codecov.
|
|
This PR is no longer needed since |
|
@DominicKramer I thought this PR was about |
|
My mistake, I meant to say |
Fixes: #91