Getting execution-id / trace in background functions
See original GitHub issueEnvironment details
- OS: MacOS 10.13.6
- Node.js version: 10.15.3
- npm version: 6.4.1
@google-cloud/logging
version: 5.3.1- Firebase Cloud Functions
Steps to reproduce
- In a Firebase cloud functions (scheduler or pubsub or httpRequest)
console.log('Init');
This gets taged correctly with an execution and the correct labels. 2.
import { Logging, detectServiceContext } from '@google-cloud/logging';
I’ve tried stealing export function getCurrentTraceFromAgent() {
and the detectServiceContext
trick
from @google-cloud/logging-bunyan": “^1.2.3”, it didn’t work either.
Also went around https://stackoverflow.com/questions/49185824/log-jsonpayload-in-firebase-cloud-functions it didn’t work.
It’s been 5hours and I’m starting to get a bit crazy on how to achieve the same behavior than a console.log
and adding my own metadata
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:19 (8 by maintainers)
Top Results From Across the Web
node.js - Getting functionName and executionId inside ...
Use the firebase functions logger to report all logs from out logger to // Can ... We just then use the function log...
Read more >Cloud Functions execution environment
Each function runs in its own isolated secure execution context, scales automatically, and has a lifecycle independent from other functions.
Read more >Workflow Executions from a Task State - AWS Step Functions
When provided, you can easily trace the executions of your workflows from starting executions to their started workflow executions. Using the previous example, ......
Read more >How can I track the execution of PL/SQL and SQL? - Ask TOM
Is it possible to find out the number of times a procedure or a function get executed?Can I use the view v$librarycache to...
Read more >Functions API - Docs - Appwrite
Get Execution. GET/v1/functions/{functionId}/executions/{executionId}. Get a function execution log by its ...
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
Same here, being able to reproduce the behavior of
console.log
for Node 10 in order to customize it using this module seems essential.Any updates? It’s a must have to me to be able to follow an error with additional jsonPayload alongside its execution id