https://posthog.com/component---src-pages-docs-distributed-tracing-index-tsx-707c0a7a1419dc9b8a2a.js
1"use strict";(self.webpackChunkposthog_com=self.webpackChunkposthog_com||[]).push([[5768],{15044:function(e,t,s){s.d(t,{A:function(){return a}});s(30758);var i=s(72753),n=s(93747),r=s(86070);function a(e){let{subheader:t,title:s,description:a,buttonText:o,buttonLink:l,secondaryButtonLink:c,secondaryButtonText:d,secondaryExternalNoIcon:h,imageColumnClasses:x,imageUrl:m,imageClasses:u}=e;return(0,r.jsxs)("div",{className:"bg-accent border border-primary rounded flex flex-col items-center md:flex-row md:gap-4 mb-8",children:[(0,r.jsxs)("div",{className:"p-4 pb-0 md:p-8 flex-1 w-full",children:[(0,r.jsx)("p",{className:"text-[15px] text-secondary mb-1",children:t}),(0,r.jsx)("h1",{className:"text-3xl md:text-4xl mt-0 mb-1 md:mb-2",children:s}),(0,r.jsxs)("h3",{className:"text-base md:text-lg font-semibold text-secondary !leading-tight my-4",children:[" ",a]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.E0,{to:l,children:o}),c&&d&&(0,r.jsx)(i.E0,{externalNoIcon:null!=h&&h,type:"secondary",to:c,children:d})]})]}),m&&(0,r.jsx)("figure",{className:"m-0 mt-auto px-4 pb-4 md:px-8 md:pb-6 flex items-end justify-center",children:(0,r.jsx)(n.A,{alt:"",placeholder:"none",quality:100,className:x,imgClassName:null!=u?u:"max-h-40 md:max-h-52",src:m})})]})}},69576:function(e,t,s){s.r(t),s.d(t,{Content:function(){return h}});var i=s(8462),n=s(87927),r=s(15044),a=s(40435),o=s(2212),l=s(60086),c=s(82335),d=s(86070);const h=()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("section",{className:"mb-8",children:[(0,d.jsx)("h2",{className:"mb-4",children:"Overview"}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{children:["PostHog Distributed Tracing works with the OpenTelemetry Protocol (OTLP). Use standard OpenTelemetry libraries to send spans to PostHog using your project token. On Node.js and Python, the PostHog SDK can also create and export spans itself, with no OpenTelemetry dependency â see the ",(0,d.jsx)(o.A,{to:"/docs/distributed-tracing/installation/nodejs",children:"Node.js"})," and"," ",(0,d.jsx)(o.A,{to:"/docs/distributed-tracing/installation/python",children:"Python"})," guides."]}),(0,d.jsx)("p",{children:"Distributed tracing is currently in beta. Setup details may change before general availability."})]})]}),(0,d.jsxs)("section",{className:"mb-8",children:[(0,d.jsx)("h2",{className:"mb-4 mt-0",children:"Why use PostHog Distributed Tracing?"}),(0,d.jsx)("div",{children:(0,d.jsxs)("ul",{children:[(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"OpenTelemetry-compatible"})," - Use standard OpenTelemetry SDKs, no PostHog packages required. Works with any compatible client, or with the span API in"," ",(0,d.jsx)("code",{children:"posthog-node"})," and ",(0,d.jsx)("code",{children:"posthog"})," for Python."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Part of the observability suite"})," - Traces use the same OpenTelemetry ingestion as"," ",(0,d.jsx)(o.A,{to:"/docs/logs",children:"Logs"}),", in the same PostHog project as session replays, errors, and analytics."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"No vendor lock-in"})," - Works with your existing OpenTelemetry setup."]})]})})]}),(0,d.jsxs)("section",{className:"mb-8",children:[(0,d.jsx)("h2",{className:"mb-4 mt-0",children:"How it works"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{children:"Distributed tracing acts as a generic OTLP receiver built by PostHog. Here's how it works:"}),(0,d.jsxs)("ol",{children:[(0,d.jsx)("li",{children:"Use standard OpenTelemetry tracing APIs in your application"}),(0,d.jsx)("li",{children:"Include your project token in the Authorization header or as a query parameter"}),(0,d.jsx)("li",{children:"Configure your OpenTelemetry client to send spans to PostHog's HTTP endpoint"}),(0,d.jsx)("li",{children:"Search and explore your traces in the PostHog interface"})]})]})]}),(0,d.jsxs)("section",{className:"mb-8",children:[(0,d.jsx)("h2",{className:"mb-4",children:"Next steps"}),(0,d.jsxs)("ul",{className:"m-0 mb-3 p-0 flex flex-col gap-4 md:grid grid-cols-1 @md:grid-cols-2",children:[(0,d.jsx)(n.A,{type:"Getting started",title:"Why you need tracing",description:"What a trace is, what it shows you that nothing else does, and when it saves you",url:"/docs/distributed-tracing/basics"}),(0,d.jsx)(n.A,{type:"Getting started",title:"Start here",description:"A high-level overview of setting up tracing with OpenTelemetry",url:"/docs/distributed-tracing/start-here"}),(0,d.jsx)(n.A,{type:"Getting started",title:"Installation",description:"Language-specific guides for exporting OpenTelemetry traces to PostHog",url:"/docs/distributed-tracing/installation"}),(0,d.jsx)(n.A,{type:"Related",title:"Logs",description:"Search and analyze your application logs â traces' sibling in the observability suite",url:"/docs/logs"})]})]})]});t.default=()=>{const e=(0,l.A)({handle:"traces"}),t=(0,c.vx)({productData:e,activeSurface:"docs",currentPath:"/docs/distributed-tracing"});return(0,d.jsxs)(a.Ay,{menuTabs:t,productSelect:e?(0,d.jsx)(c.Hc,{activeHandle:e.handle}):void 0,children:[(0,d.jsx)(i.kW,{title:"Distributed tracing - Docs - PostHog"}),(0,d.jsxs)("div",{className:"mx-auto max-w-4xl",children:[(0,d.jsx)("section",{className:"mb-6",children:(0,d.jsx)(r.A,{subheader:"Getting started",title:"Distributed tracing",description:"Capture and explore distributed traces with PostHog and OpenTelemetry.",buttonText:"Get started!",buttonLink:"/docs/distributed-tracing/start-here"})}),(0,d.jsx)(h,{})]})]})}}}]); 2//# sourceMappingURL=component---src-pages-docs-distributed-tracing-index-tsx-70
27c0a7a1419dc9b8a2a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.