Telemetry
Package: agentrouter.telemetry.v1 Service: TelemetryService
Endpoints
Create a telemetry export config
What it does: Creates a new OTel export configuration.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id scopes the request path; used for path-level validation. |
project_id | yes | project_id scopes the request path; used for path-level validation. |
telemetry_type | no | telemetry_type partitions sinks; defaults to "traces" when empty. |
endpoint | yes | endpoint is the OTLP sink URL. |
protocol | no | protocol defaults to "http/protobuf" when empty. |
auth_type | no | auth_type defaults to "none" when empty. |
auth_value | no | auth_value is the plaintext credential to encrypt at rest. |
api_key_header | no | api_key_header is the header name when auth_type is api_key. |
headers | no | headers is sugar for the CLI: any of these are appended as basic headers on outbound exports. Currently advisory -- the backing configuration carries auth_type + auth_value. |
enabled | no | enabled toggles the configuration; defaults to true when unset. Use the "yes"/"no"/"true"/"false" CLI form; absent is treated as true. |
Response fields:
| Field | Required | Description |
|---|---|---|
id | no | id is the server-assigned unique identifier for this config row. |
user_id | no | user_id is the owning (authenticated) caller; the row key. |
telemetry_type | no | telemetry_type partitions sinks for traces, metrics, logs. |
sink_url | no | sink_url is the destination OTLP endpoint. |
protocol | no | protocol is one of: grpc, http/json, http/protobuf. |
auth_type | no | auth_type is one of: none, bearer, basic, api_key. |
auth_value | no | auth_value is a secret reference. Returned on Get / Create. Empty on List (avoid leakage in bulk reads). |
api_key_header | no | api_key_header is the header name for api_key auth (defaults to X-API-Key). |
enabled | no | enabled indicates whether exports to this sink are active. |
last_checked_at | no | last_checked_at is when the sink's reachability was last probed. |
status | no | status is one of: connected, disconnected, error, testing. |
created_at | no | created_at is when this config was first created. |
updated_at | no | updated_at is when this config was last modified. |
{"signatures":{"go":"func (x *TelemetryClient) CreateTelemetryConfig(ctx context.Context, req *telemetryv1.CreateTelemetryConfigRequest) (*telemetryv1.TelemetryConfig, error)","python":"create_telemetry_config(req: telemetry_pb2.CreateTelemetryConfigRequest) -\u003e TelemetryConfig","typescript":"createTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.CreateTelemetryConfigRequestSchema\u003e): Promise\u003cTelemetryConfig\u003e","cli":"tare api telemetry create --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --endpoint $ENDPOINT","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"telemetry_type\": \"...\",\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"headers\": {},\n \"enabled\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.CreateTelemetryConfigRequest{}\n\n\tresp, err := client.Telemetry().CreateTelemetryConfig(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/createtelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.CreateTelemetryConfigRequest()\ntry:\n result = client.telemetry.create_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.createTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry create --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --endpoint $ENDPOINT","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"telemetry_type\": \"...\",\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"headers\": {},\n \"enabled\": false\n }'"},"persona":"Authenticated (API key or session token)","httpVerb":"POST","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry","slug":"create-a-telemetry-export-config"}
List telemetry export configs
What it does: Lists every configuration owned by the caller within the (customer, project) scope.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id scopes the request path; used for path-level validation. |
project_id | yes | project_id scopes the request path; used for path-level validation. |
telemetry_type | no | Optional telemetry_type filter. |
enabled | no | enabled is a tri-state encoded as a string: "" (no filter), "true", "false". Avoids optional bool because the CLI generator does not yet emit pointer assignments. |
Response fields:
| Field | Required | Description |
|---|---|---|
configs | no | configs is the matching set of configs owned by the caller. |
total | no | total is the count of returned configs. |
{"signatures":{"go":"func (x *TelemetryClient) ListTelemetryConfigs(ctx context.Context, req *telemetryv1.ListTelemetryConfigsRequest) (*telemetryv1.ListTelemetryConfigsResponse, error)","python":"list_telemetry_configs(req: telemetry_pb2.ListTelemetryConfigsRequest) -\u003e ListTelemetryConfigsResponse","typescript":"listTelemetryConfigs(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.ListTelemetryConfigsRequestSchema\u003e): Promise\u003cListTelemetryConfigsResponse\u003e","cli":"tare api telemetry list --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.ListTelemetryConfigsRequest{}\n\n\tresp, err := client.Telemetry().ListTelemetryConfigs(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/listtelemetryconfigs\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.ListTelemetryConfigsRequest()\ntry:\n result = client.telemetry.list_telemetry_configs(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.listTelemetryConfigs(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry list --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry","slug":"list-telemetry-export-configs"}
Get a telemetry export config
What it does: Returns a single configuration by id.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id scopes the request path; used for path-level validation. |
project_id | yes | project_id scopes the request path; used for path-level validation. |
config_id | yes | config_id is the id of the config to fetch. |
Response fields:
| Field | Required | Description |
|---|---|---|
id | no | id is the server-assigned unique identifier for this config row. |
user_id | no | user_id is the owning (authenticated) caller; the row key. |
telemetry_type | no | telemetry_type partitions sinks for traces, metrics, logs. |
sink_url | no | sink_url is the destination OTLP endpoint. |
protocol | no | protocol is one of: grpc, http/json, http/protobuf. |
auth_type | no | auth_type is one of: none, bearer, basic, api_key. |
auth_value | no | auth_value is a secret reference. Returned on Get / Create. Empty on List (avoid leakage in bulk reads). |
api_key_header | no | api_key_header is the header name for api_key auth (defaults to X-API-Key). |
enabled | no | enabled indicates whether exports to this sink are active. |
last_checked_at | no | last_checked_at is when the sink's reachability was last probed. |
status | no | status is one of: connected, disconnected, error, testing. |
created_at | no | created_at is when this config was first created. |
updated_at | no | updated_at is when this config was last modified. |
{"signatures":{"go":"func (x *TelemetryClient) GetTelemetryConfig(ctx context.Context, req *telemetryv1.GetTelemetryConfigRequest) (*telemetryv1.TelemetryConfig, error)","python":"get_telemetry_config(req: telemetry_pb2.GetTelemetryConfigRequest) -\u003e TelemetryConfig","typescript":"getTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.GetTelemetryConfigRequestSchema\u003e): Promise\u003cTelemetryConfig\u003e","cli":"tare api telemetry get --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.GetTelemetryConfigRequest{}\n\n\tresp, err := client.Telemetry().GetTelemetryConfig(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/gettelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.GetTelemetryConfigRequest()\ntry:\n result = client.telemetry.get_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.getTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry get --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry/{config_id}","slug":"get-a-telemetry-export-config"}
Update a telemetry export config
What it does: Updates a configuration's mutable fields.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id scopes the request path; used for path-level validation. |
project_id | yes | project_id scopes the request path; used for path-level validation. |
config_id | yes | config_id is the id of the config to update. |
endpoint | no | Empty string means "leave unchanged". |
protocol | no | protocol -- empty leaves unchanged; otherwise grpc, http/json, http/protobuf. |
auth_type | no | auth_type -- empty leaves unchanged; otherwise none, bearer, basic, api_key. |
auth_value | no | auth_value -- new plaintext credential to encrypt; empty leaves unchanged. |
api_key_header | no | api_key_header -- header name for api_key auth; empty leaves unchanged. |
enabled | no | enabled tri-state encoded as "" (unchanged), "true", "false". |
status | no | status -- reported connection state; empty leaves unchanged. |
Response fields:
| Field | Required | Description |
|---|---|---|
id | no | id is the server-assigned unique identifier for this config row. |
user_id | no | user_id is the owning (authenticated) caller; the row key. |
telemetry_type | no | telemetry_type partitions sinks for traces, metrics, logs. |
sink_url | no | sink_url is the destination OTLP endpoint. |
protocol | no | protocol is one of: grpc, http/json, http/protobuf. |
auth_type | no | auth_type is one of: none, bearer, basic, api_key. |
auth_value | no | auth_value is a secret reference. Returned on Get / Create. Empty on List (avoid leakage in bulk reads). |
api_key_header | no | api_key_header is the header name for api_key auth (defaults to X-API-Key). |
enabled | no | enabled indicates whether exports to this sink are active. |
last_checked_at | no | last_checked_at is when the sink's reachability was last probed. |
status | no | status is one of: connected, disconnected, error, testing. |
created_at | no | created_at is when this config was first created. |
updated_at | no | updated_at is when this config was last modified. |
{"signatures":{"go":"func (x *TelemetryClient) UpdateTelemetryConfig(ctx context.Context, req *telemetryv1.UpdateTelemetryConfigRequest) (*telemetryv1.TelemetryConfig, error)","python":"update_telemetry_config(req: telemetry_pb2.UpdateTelemetryConfigRequest) -\u003e TelemetryConfig","typescript":"updateTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.UpdateTelemetryConfigRequestSchema\u003e): Promise\u003cTelemetryConfig\u003e","cli":"tare api telemetry update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"enabled\": \"...\",\n \"status\": \"...\"\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.UpdateTelemetryConfigRequest{}\n\n\tresp, err := client.Telemetry().UpdateTelemetryConfig(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/updatetelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.UpdateTelemetryConfigRequest()\ntry:\n result = client.telemetry.update_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.updateTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry update --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl -X PATCH \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"enabled\": \"...\",\n \"status\": \"...\"\n }'"},"persona":"Authenticated (API key or session token)","httpVerb":"PATCH","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry/{config_id}","slug":"update-a-telemetry-export-config"}
Delete a telemetry export config
What it does: Removes a configuration.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id scopes the request path; used for path-level validation. |
project_id | yes | project_id scopes the request path; used for path-level validation. |
config_id | yes | config_id is the id of the config to delete. |
{"signatures":{"go":"func (x *TelemetryClient) DeleteTelemetryConfig(ctx context.Context, req *telemetryv1.DeleteTelemetryConfigRequest) error","python":"delete_telemetry_config(req: telemetry_pb2.DeleteTelemetryConfigRequest) -\u003e None","typescript":"deleteTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.DeleteTelemetryConfigRequestSchema\u003e): Promise\u003cvoid\u003e","cli":"tare api telemetry delete --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.DeleteTelemetryConfigRequest{}\n\n\tif err := client.Telemetry().DeleteTelemetryConfig(ctx, req); err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Println(\"ok\")\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/deletetelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.DeleteTelemetryConfigRequest()\ntry:\n result = client.telemetry.delete_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.deleteTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry delete --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --config-id $CONFIG_ID","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"DELETE","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry/{config_id}","slug":"delete-a-telemetry-export-config"}
Set the project telemetry export config
What it does: Upserts the PROJECT-level telemetry export config (the shared default applied to project members who have no config of their own). Project-owner-tier: only the project's owner may set it. A user's own per-user config OVERRIDES this at emit time.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id identifies the project's customer. |
project_id | yes | project_id identifies the project whose shared config is being set. |
telemetry_type | no | telemetry_type partitions sinks; defaults to "traces" when empty. |
endpoint | yes | endpoint is the OTLP sink URL. |
protocol | no | protocol defaults to "http/protobuf" when empty. |
auth_type | no | auth_type defaults to "none" when empty. |
auth_value | no | auth_value is the plaintext credential to encrypt at rest. |
api_key_header | no | api_key_header is the header name when auth_type is api_key. |
enabled | no | enabled toggles the configuration; defaults to true when unset. |
Response fields:
| Field | Required | Description |
|---|---|---|
id | no | id is the server-assigned unique identifier for this config row. |
user_id | no | user_id is the owning (authenticated) caller; the row key. |
telemetry_type | no | telemetry_type partitions sinks for traces, metrics, logs. |
sink_url | no | sink_url is the destination OTLP endpoint. |
protocol | no | protocol is one of: grpc, http/json, http/protobuf. |
auth_type | no | auth_type is one of: none, bearer, basic, api_key. |
auth_value | no | auth_value is a secret reference. Returned on Get / Create. Empty on List (avoid leakage in bulk reads). |
api_key_header | no | api_key_header is the header name for api_key auth (defaults to X-API-Key). |
enabled | no | enabled indicates whether exports to this sink are active. |
last_checked_at | no | last_checked_at is when the sink's reachability was last probed. |
status | no | status is one of: connected, disconnected, error, testing. |
created_at | no | created_at is when this config was first created. |
updated_at | no | updated_at is when this config was last modified. |
{"signatures":{"go":"func (x *TelemetryClient) SetProjectTelemetryConfig(ctx context.Context, req *telemetryv1.SetProjectTelemetryConfigRequest) (*telemetryv1.TelemetryConfig, error)","python":"set_project_telemetry_config(req: telemetry_pb2.SetProjectTelemetryConfigRequest) -\u003e TelemetryConfig","typescript":"setProjectTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.SetProjectTelemetryConfigRequestSchema\u003e): Promise\u003cTelemetryConfig\u003e","cli":"tare api telemetry set-project --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --endpoint $ENDPOINT","curl":"curl -X PUT \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/project\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"telemetry_type\": \"...\",\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"enabled\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.SetProjectTelemetryConfigRequest{}\n\n\tresp, err := client.Telemetry().SetProjectTelemetryConfig(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/setprojecttelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.SetProjectTelemetryConfigRequest()\ntry:\n result = client.telemetry.set_project_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.setProjectTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry set-project --customer-id $CUSTOMER_ID --project-id $PROJECT_ID --endpoint $ENDPOINT","curl":"curl -X PUT \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/project\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"telemetry_type\": \"...\",\n \"endpoint\": \"...\",\n \"protocol\": \"...\",\n \"auth_type\": \"...\",\n \"auth_value\": \"...\",\n \"api_key_header\": \"...\",\n \"enabled\": false\n }'"},"persona":"Authenticated (API key or session token)","httpVerb":"PUT","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry/project","slug":"set-the-project-telemetry-export-config"}
Get the project telemetry export config
What it does: Returns the PROJECT-level telemetry config. Project-owner-tier (the shared project default is managed by owners).
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | yes | customer_id identifies the project's customer. |
project_id | yes | project_id identifies the project whose shared config is requested. |
telemetry_type | no | telemetry_type partitions sinks; defaults to "traces" when empty. |
Response fields:
| Field | Required | Description |
|---|---|---|
id | no | id is the server-assigned unique identifier for this config row. |
user_id | no | user_id is the owning (authenticated) caller; the row key. |
telemetry_type | no | telemetry_type partitions sinks for traces, metrics, logs. |
sink_url | no | sink_url is the destination OTLP endpoint. |
protocol | no | protocol is one of: grpc, http/json, http/protobuf. |
auth_type | no | auth_type is one of: none, bearer, basic, api_key. |
auth_value | no | auth_value is a secret reference. Returned on Get / Create. Empty on List (avoid leakage in bulk reads). |
api_key_header | no | api_key_header is the header name for api_key auth (defaults to X-API-Key). |
enabled | no | enabled indicates whether exports to this sink are active. |
last_checked_at | no | last_checked_at is when the sink's reachability was last probed. |
status | no | status is one of: connected, disconnected, error, testing. |
created_at | no | created_at is when this config was first created. |
updated_at | no | updated_at is when this config was last modified. |
{"signatures":{"go":"func (x *TelemetryClient) GetProjectTelemetryConfig(ctx context.Context, req *telemetryv1.GetProjectTelemetryConfigRequest) (*telemetryv1.TelemetryConfig, error)","python":"get_project_telemetry_config(req: telemetry_pb2.GetProjectTelemetryConfigRequest) -\u003e TelemetryConfig","typescript":"getProjectTelemetryConfig(req: MessageInitShape\u003ctypeof tars_telemetry_v1_telemetry_pb.GetProjectTelemetryConfigRequestSchema\u003e): Promise\u003cTelemetryConfig\u003e","cli":"tare api telemetry get-project --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/project\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\ttelemetryv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/telemetry/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026telemetryv1.GetProjectTelemetryConfigRequest{}\n\n\tresp, err := client.Telemetry().GetProjectTelemetryConfig(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/telemetry/getprojecttelemetryconfig\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.telemetry.v1 import telemetry_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = telemetry_pb2.GetProjectTelemetryConfigRequest()\ntry:\n result = client.telemetry.get_project_telemetry_config(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.telemetry.getProjectTelemetryConfig(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"telemetry\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api telemetry get-project --customer-id $CUSTOMER_ID --project-id $PROJECT_ID","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../telemetry/project\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/telemetry/project","slug":"get-the-project-telemetry-export-config"}