{"title":"Send your first logs and traces","description":"Enable OpenTelemetry in Altertable, configure an exporter for logs or traces, and verify recent telemetry from your service with SQL.","order":400,"askSuggestions":["How do I send traces from an existing collector?","Why are no rows appearing after I configure the exporter?","How do I correlate logs with their traces?"],"navigation":true,"routeId":"gettingStartedOpenTelemetry","body":{"code":"var Component=(()=>{var m=Object.create;var s=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var x=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),w=(n,e)=>{for(var r in e)s(n,r,{get:e[r],enumerable:!0})},d=(n,e,r,o)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let i of f(e))!v.call(n,i)&&i!==r&&s(n,i,{get:()=>e[i],enumerable:!(o=g(e,i))||o.enumerable});return n};var D=(n,e,r)=>(r=n!=null?m(y(n)):{},d(e||!n||!n.__esModule?s(r,\"default\",{value:n,enumerable:!0}):r,n)),S=n=>d(s({},\"__esModule\",{value:!0}),n);var h=x((E,l)=>{l.exports=_jsx_runtime});var I={};w(I,{default:()=>p,frontmatter:()=>b});var t=D(h()),b={title:\"Send your first logs and traces\",routeId:\"gettingStartedOpenTelemetry\",description:\"Enable OpenTelemetry in Altertable, configure an exporter for logs or traces, and verify recent telemetry from your service with SQL.\",order:400,askSuggestions:[\"How do I send traces from an existing collector?\",\"Why are no rows appearing after I configure the exporter?\",\"How do I correlate logs with their traces?\"]};function u(n){let e={a:\"a\",code:\"code\",h1:\"h1\",h2:\"h2\",p:\"p\",pre:\"pre\",strong:\"strong\",...n.components},{DocsPreviewDocument:r,DocsPreviewSection:o,DocsPrompt:i,DocsPrompts:c}=e;return r||a(\"DocsPreviewDocument\",!0),o||a(\"DocsPreviewSection\",!0),i||a(\"DocsPrompt\",!0),c||a(\"DocsPrompts\",!0),(0,t.jsxs)(r,{anchors:\"send-your-first-logs-and-traces 1-enable-opentelemetry 2-configure-one-signal 3-verify-the-data do-this-with-your-agent\",children:[(0,t.jsxs)(o,{sectionId:\"send-your-first-logs-and-traces\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,t.jsx)(e.h1,{id:\"send-your-first-logs-and-traces\",children:\"Send your first logs and traces\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"Connect an instrumented service to Altertable and verify a log or trace. Altertable accepts OTLP/HTTP logs, traces, and metrics in protobuf or JSON. For metrics, follow \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/metrics\",children:\"Send metrics\"}),\".\"]}),`\n`]}),(0,t.jsxs)(o,{sectionId:\"1-enable-opentelemetry\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,t.jsx)(e.h2,{id:\"1-enable-opentelemetry\",children:\"1. Enable OpenTelemetry\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"In \",(0,t.jsx)(e.strong,{children:\"Catalogs\"}),\", choose \",(0,t.jsx)(e.strong,{children:\"New Catalog\"}),\" and enable \",(0,t.jsx)(e.strong,{children:\"OpenTelemetry\"}),\" in the intended environment. Copy that environment's \",(0,t.jsx)(e.a,{href:\"/docs/administration/lakehouse-credentials\",children:\"lakehouse credentials\"}),\".\"]}),`\n`]}),(0,t.jsxs)(o,{sectionId:\"2-configure-one-signal\",anchors:\"\",ancestors:\"\",index:\"2\",children:[(0,t.jsx)(e.h2,{id:\"2-configure-one-signal\",children:\"2. Configure one signal\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"If your service already uses an OpenTelemetry SDK or collector, follow \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/logs\",children:\"Send logs\"}),\" or \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/traces\",children:\"Send traces\"}),\". Configure the signal endpoint and the \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/setup#1-configure-authentication\",children:\"Basic Auth header\"}),\", then generate activity in the service.\"]}),`\n`,(0,t.jsxs)(e.p,{children:[\"If your service is not instrumented, start with \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/setup#sdk-and-collector-setup\",children:\"SDK and collector setup\"}),\". You can also use the agent prompt below to configure instrumentation for your application.\"]}),`\n`]}),(0,t.jsxs)(o,{sectionId:\"3-verify-the-data\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,t.jsx)(e.h2,{id:\"3-verify-the-data\",children:\"3. Verify the data\"}),`\n`,(0,t.jsxs)(e.p,{children:[\"In \",(0,t.jsx)(e.a,{href:\"/docs/lakehouse/query/sql-explorer\",children:\"SQL Explorer\"}),\", run the query for the signal you sent:\"]}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-sql\",children:`SELECT * FROM opentelemetry.main.logs ORDER BY timestamp DESC LIMIT 10;\n`})}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-sql\",children:`SELECT * FROM opentelemetry.main.spans ORDER BY start_time DESC LIMIT 10;\n`})}),`\n`,(0,t.jsxs)(e.p,{children:[\"Confirm that the returned service, timestamps, and attributes match the activity you generated. Continue with \",(0,t.jsx)(e.a,{href:\"/docs/opentelemetry/query\",children:\"querying and correlating telemetry\"}),\".\"]}),`\n`]}),(0,t.jsxs)(o,{sectionId:\"do-this-with-your-agent\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,t.jsx)(e.h2,{id:\"do-this-with-your-agent\",children:\"Do this with your agent\"}),`\n`,(0,t.jsx)(c,{children:(0,t.jsx)(i,{children:\"Read https://altertable.ai/docs/opentelemetry/setup.md. Configure this service to send logs or traces to Altertable. Inspect existing instrumentation and ask only for the signal or target environment you cannot determine. Reuse the existing SDK or collector and preserve other exporters. Keep lakehouse credentials in server-side secret configuration. Send one controlled test signal and query it by service, test identifier, and a bounded time window. Confirm the timestamps and attributes; do not treat a successful export request as proof that the data arrived.\"})})]})]})}function p(n={}){let{wrapper:e}=n.components||{};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(u,{...n})}):u(n)}function a(n,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+n+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return S(I);})();\n;return Component;"},"_id":"docs/getting-started/opentelemetry.mdx","_raw":{"sourceFilePath":"docs/getting-started/opentelemetry.mdx","sourceFileName":"opentelemetry.mdx","sourceFileDir":"docs/getting-started","contentType":"mdx","flattenedPath":"docs/getting-started/opentelemetry"},"type":"Docs","path":"/getting-started/opentelemetry","level":2,"parent":"getting-started"}