Updated on 2023-04-27 GMT+08:00

Registering OpenTelemetry APIs

http://${EXTENSION_API_ADDR}/telemetry

Use environment variable EXTENSION_API_ADDR to obtain the API registration address provided by FunctionGraph. For example, for Python, use the os.getenv("EXTENSION_API_ADDR") method to obtain the registration address.

Path

- /telemetry

Method

– POST

Body Parameters

{
        "subscriber": {
            "protocol": "POST",
            "uri": "http://127.0.0.1:{PORT}"
        },
        "types": ["platform", "function", "extension"],
}

  • The request body must contain the preceding JSON fields.
  • protocol indicates the request type. The value must be POST.
  • uri indicates the URI of the telemetry listener in the extension process for receiving telemetry data from FunctionGraph. PORT ranges from 8081 to 8090.
  • types indicates the event types to subscribe to. The options are platform, function, and extension.

Response Codes

200 - Subscription request successful.

400 - Request error with a message returned.

500 - Service error.