Configure log export destination
Configures the external OTLP endpoint a function’s runtime and/or invocation logs are pushed to as they happen. This operation is a full replace, not a patch: endpoint, headers, runtime_export_enabled, and invocation_export_enabled are all required on every call — omitting any of them is a 422, not “keep the current value”. Headers are encrypted at rest and never returned in any response.
The endpoint must be an HTTPS URL. When export is configured, new log records are converted to OTLP log records and delivered continuously; export never bypasses platform log storage, and delivery retries with a bounded policy while the destination is unreachable. Only logs generated after configuration are exported — there is no historical replay.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const FuncLogExportConfig = await client.compute.funcs.export.create('id', {
endpoint: 'endpoint',
headers: {},
invocation_export_enabled: true,
runtime_export_enabled: true,
});
console.log(FuncLogExportConfig.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
func_log_export_config = client.compute.funcs.export.create(
id="id",
endpoint="endpoint",
headers={},
invocation_export_enabled=True,
runtime_export_enabled=True,
)
print(func_log_export_config.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
export, err := client.Compute.Funcs.Export.New(
context.TODO(),
"id",
telnyx.ComputeFuncExportNewParams{
Endpoint: "endpoint",
Headers: "headers",
InvocationExportEnabled: true,
RuntimeExportEnabled: true,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", export.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.compute.funcs.export.ExportCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExportCreateParams params = ExportCreateParams.builder()
.endpoint("endpoint")
.headers(null)
.invocationExportEnabled(true)
.runtimeExportEnabled(true)
.build();
var response = client.compute().funcs().export().create("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
func_log_export_config = telnyx.compute.funcs.export.create(
"id",
endpoint: "endpoint",
headers: {},
invocation_export_enabled: true,
runtime_export_enabled: true
)
puts(func_log_export_config)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$func_log_export_config = $client->compute->funcs->export->create(
'id',
endpoint: 'endpoint',
headers: [],
invocation_export_enabled: true,
runtime_export_enabled: true,
);
var_dump($func_log_export_config);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx compute:funcs:export create \
--api-key 'My API Key' \
--id id \
--endpoint endpoint \
--headers '{}' \
--runtime-export-enabled \
--invocation-export-enabledcurl --request PUT \
--url https://api.telnyx.com/v2/compute/funcs/{id}/logs/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "https://api.honeycomb.io/v1/logs",
"headers": {
"x-honeycomb-team": "abc123"
},
"runtime_export_enabled": true,
"invocation_export_enabled": true
}
'{
"data": {
"record_type": "compute_func_log_export_config",
"id": "cfg-1",
"func_id": "6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
"endpoint": "https://api.honeycomb.io/v1/logs",
"enabled": true,
"runtime_export_enabled": true,
"invocation_export_enabled": true,
"created_at": "2026-09-18T14:30:00.000Z",
"updated_at": "2026-09-21T18:00:00.000Z"
}
}{
"data": {
"record_type": "compute_func_log_export_config",
"id": "cfg-1",
"func_id": "6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
"endpoint": "https://api.honeycomb.io/v1/logs",
"enabled": true,
"runtime_export_enabled": true,
"invocation_export_enabled": true,
"created_at": "2026-09-21T18:00:00.000Z",
"updated_at": "2026-09-21T18:00:00.000Z"
}
}{
"errors": [
{
"code": "10020",
"title": "Unprocessable entity",
"detail": "Request could not be processed."
}
]
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "Invalid or missing API key."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10020",
"title": "Unprocessable entity",
"detail": "Request could not be processed: this endpoint is a full replace — endpoint, headers, runtime_export_enabled, and invocation_export_enabled are all required on every call."
}
]
}{
"errors": [
{
"code": "10010",
"title": "Internal server error",
"detail": "An unexpected error occurred."
}
]
}Authorizations
Body
Full-replace configuration body. All fields are required on every call: the API treats PUT as a replace (RFC 7231), so omitting any field is a 422, not "keep the current value".
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const FuncLogExportConfig = await client.compute.funcs.export.create('id', {
endpoint: 'endpoint',
headers: {},
invocation_export_enabled: true,
runtime_export_enabled: true,
});
console.log(FuncLogExportConfig.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
func_log_export_config = client.compute.funcs.export.create(
id="id",
endpoint="endpoint",
headers={},
invocation_export_enabled=True,
runtime_export_enabled=True,
)
print(func_log_export_config.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
export, err := client.Compute.Funcs.Export.New(
context.TODO(),
"id",
telnyx.ComputeFuncExportNewParams{
Endpoint: "endpoint",
Headers: "headers",
InvocationExportEnabled: true,
RuntimeExportEnabled: true,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", export.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.compute.funcs.export.ExportCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ExportCreateParams params = ExportCreateParams.builder()
.endpoint("endpoint")
.headers(null)
.invocationExportEnabled(true)
.runtimeExportEnabled(true)
.build();
var response = client.compute().funcs().export().create("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
func_log_export_config = telnyx.compute.funcs.export.create(
"id",
endpoint: "endpoint",
headers: {},
invocation_export_enabled: true,
runtime_export_enabled: true
)
puts(func_log_export_config)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$func_log_export_config = $client->compute->funcs->export->create(
'id',
endpoint: 'endpoint',
headers: [],
invocation_export_enabled: true,
runtime_export_enabled: true,
);
var_dump($func_log_export_config);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx compute:funcs:export create \
--api-key 'My API Key' \
--id id \
--endpoint endpoint \
--headers '{}' \
--runtime-export-enabled \
--invocation-export-enabledcurl --request PUT \
--url https://api.telnyx.com/v2/compute/funcs/{id}/logs/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoint": "https://api.honeycomb.io/v1/logs",
"headers": {
"x-honeycomb-team": "abc123"
},
"runtime_export_enabled": true,
"invocation_export_enabled": true
}
'{
"data": {
"record_type": "compute_func_log_export_config",
"id": "cfg-1",
"func_id": "6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
"endpoint": "https://api.honeycomb.io/v1/logs",
"enabled": true,
"runtime_export_enabled": true,
"invocation_export_enabled": true,
"created_at": "2026-09-18T14:30:00.000Z",
"updated_at": "2026-09-21T18:00:00.000Z"
}
}{
"data": {
"record_type": "compute_func_log_export_config",
"id": "cfg-1",
"func_id": "6b7e8f9a-1c2d-3e4f-5a6b-7c8d9e0f1a2b",
"endpoint": "https://api.honeycomb.io/v1/logs",
"enabled": true,
"runtime_export_enabled": true,
"invocation_export_enabled": true,
"created_at": "2026-09-21T18:00:00.000Z",
"updated_at": "2026-09-21T18:00:00.000Z"
}
}{
"errors": [
{
"code": "10020",
"title": "Unprocessable entity",
"detail": "Request could not be processed."
}
]
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "Invalid or missing API key."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10020",
"title": "Unprocessable entity",
"detail": "Request could not be processed: this endpoint is a full replace — endpoint, headers, runtime_export_enabled, and invocation_export_enabled are all required on every call."
}
]
}{
"errors": [
{
"code": "10010",
"title": "Internal server error",
"detail": "An unexpected error occurred."
}
]
}