Processing Telemetry Data
URL: http://localhost:{PORT}, where localhost indicates the local host IP address 127.0.0.1.
After event subscription with telemetry APIs, the extension receives telemetry data from FunctionGraph using the telemetry listener. Each POST request contains an Event object array in the body.
There are three event types you can subscribe to: platform, function, and extension.
Category |
Event Type |
Description |
---|---|---|
Platform events |
platform |
Function execution |
Function logs |
function |
Function code logs |
Extension logs |
extension |
Extension code logs |
platform events
Category |
Subtype |
Meaning |
Data Structure |
Example |
---|---|---|---|---|
Function is being invoked. |
platform.initStart |
Function is being initialized. |
Event: Object - name: String = platform.initStart -- Event type - startTime: String -- Start time - traceId: String -- Request ID |
{ "name":"platform.initStart ", "startTime": "2023-02-01T00:03:50.000Z ", "traceId": "69be64a7-0233-11e8-82e4-e5d37911193e" } |
platform.start |
Function is being invoked. |
|||
platform.restoreStart |
Environment is being restored. |
|||
Invocation completed |
platform.initRuntimeDone, |
Function is initialized. |
Event: Object - name: String = platform.initRuntimeDone -- Event type - startTime: String -- Start time - traceId: String -- Request ID - status: String -- Request status |
{ "name": " platform.initRuntimeDone", "startTime": "2023-02-01T00:03:50.000Z", "traceId": "69be64a7-0233-11e8-82e4-e5d37911193e", "status":" success ", } |
platform.RuntimeDone |
Function is invoked. |
|||
platform.restoreRuntimeDone |
Environment is restored. |
|||
Invocation report |
platform.initReport |
Initialization report |
Event: Object - name: String = platform.initReport | platform.report | platform.restoreReport -- Event type - startTime: String -- Start time - traceId: String -- Request ID - endTime: String -- End time - status: String -- Request status - metrics: reportMetrics -- Invocation data reportMetrics: Object - durationMs: float64 -- Invocation duration - billingDurationMS: float64 -- Billed duration - memoryUsed: float64 -- Memory used - memorySize: int -- Memory size - podName: String -- Pod name |
{ "name": " platform.initReport", "startTime": "2023-02-01T00:03:50.000Z", "traceId": "69be64a7-0233-11e8-82e4-e5d37911193e", "endTime":" 2023-02-02T00:03:50.000Z ", "status":" success ", "reportMetrics": { "durationMs": 10.6, "billingDurationMS": 11, "memoryUsed": 23.4, " memorySize ": 128, "podName": pool22-300-128-fusion-64774779-4g77v, } } |
platform.report |
Invocation report |
|||
platform.restoreReport |
Environment restoration report |
function events
Type |
Data Structure |
Example |
---|---|---|
Function |
Event: Object - name: String -- Event type - startTime: String -- Start time - logs: string -- Logs |
Add [Function] to the logs to collect. Example: [Function] This is a simple log. { "name": "function", "startTime": "2023-02-01T00:03:50.000Z", "logs": "[Function]this is a simple log." } |
extension events
Type |
Data Structure |
Example |
---|---|---|
Extension |
Event: Object - name: String -- Event type - startTime: String -- Start time - logs: string -- Logs |
Add [Extension] to the logs to collect. Example: [Extension] This is a simple log. { "name": "extension", "startTime": "2023-02-01T00:03:50.000Z", "logs": "[Extension]this is a simple log." } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.