{
    "url": "https://delaparra-services.nl/knowledge-hub/sampling",
    "locale": "en",
    "title": "sampling: Knowledge hub | DeLaParra Services",
    "description": "Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/sampling",
        "nl": "https://delaparra-services.nl/nl/kennisbank/sampling"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/sampling.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/sampling.md",
        "json": "https://delaparra-services.nl/knowledge-hub/sampling.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/sampling.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/sampling.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling.csv",
            "encodingFormat": "text/csv",
            "name": "sampling.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling.json",
            "encodingFormat": "application/json",
            "name": "sampling.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling.md",
            "encodingFormat": "text/markdown",
            "name": "sampling.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling.pdf",
            "encodingFormat": "application/pdf",
            "name": "sampling.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling.zip",
            "encodingFormat": "application/zip",
            "name": "sampling.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/sampling/skills.zip",
            "encodingFormat": "application/zip",
            "name": "sampling-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [sampling](<https://delaparra-services.nl/knowledge-hub/sampling>)\n\n  \n\nCategory: Observability \n\n# sampling\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is sampling?\n\n \n\nsampling: Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace. Sampling means keeping only part of your traces or logs to control cost and volume. Storing every trace from a busy service can be very expensive, and most of them look the same.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about sampling\n\n  \n\n### How is sampling used in practice?\n\n \n\nHead sampling decides at the start of a request, for example keeping one percent. It is cheap but random, so it may drop the rare interesting ones. Tail sampling decides after the request finishes, so you can keep every error and every slow request while sampling the normal ones.\n\n    \n\n### What should you keep in mind with sampling?\n\n \n\nA practical rule is to keep all errors and slow requests, and a small share of healthy traffic. The OpenTelemetry Collector supports tail sampling. Metrics should not be sampled this way; they are cheap and you want complete numbers. Make sure dashboards that count from traces account for the sample rate.\n\n    \n\n### What does an example of sampling look like?\n\n \n\n```\nsample 100% of errors, 1% of healthy traces\n```\n\n \n\n## At a glance\n\n   CategoryObservability Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More Observability terms\n\n \n\n- [Prometheus](<https://delaparra-services.nl/knowledge-hub/prometheus>) \n- [PromQL](<https://delaparra-services.nl/knowledge-hub/promql>) \n- [RED method](<https://delaparra-services.nl/knowledge-hub/red-method>) \n- [SLA](<https://delaparra-services.nl/knowledge-hub/sla>) \n- [SLI](<https://delaparra-services.nl/knowledge-hub/sli>) \n- [SLO](<https://delaparra-services.nl/knowledge-hub/slo>)\n\n \n\n[All terms starting with S](<https://delaparra-services.nl/knowledge-hub#letter-s>)\n\n \n\n## Skills\n\n \n\n- ### Distributed Tracing\n\n \n\nImplement distributed tracing with Jaeger and Tempo to track requests across microservices and identify performance bottlenecks. Use when debugging microservices, analyzing request flows, or implementing observability for distributed systems.\n\n [View skill](<https://delaparra-services.nl/skills/distributed-tracing>) [Download zip](<https://delaparra-services.nl/skills/distributed-tracing/download>) \n- ### Prometheus Configuration\n\n \n\nSet up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.\n\n [View skill](<https://delaparra-services.nl/skills/prometheus-configuration>) [Download zip](<https://delaparra-services.nl/skills/prometheus-configuration/download>) \n- ### Grafana Dashboards\n\n \n\nCreate and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.\n\n [View skill](<https://delaparra-services.nl/skills/grafana-dashboards>) [Download zip](<https://delaparra-services.nl/skills/grafana-dashboards/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/sampling/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [Logging and monitoring for your app](<https://delaparra-services.nl/manuals/logging-en-monitoring>)\n\n \n\n## Related services\n\n \n\n- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)\n\nPerhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/sampling)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/sampling#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/sampling",
                "name": "sampling: Knowledge hub | DeLaParra Services",
                "description": "Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/sampling#term",
                    "name": "sampling",
                    "description": "Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace.",
                    "termCode": "sampling",
                    "url": "https://delaparra-services.nl/knowledge-hub/sampling",
                    "inLanguage": "en",
                    "keywords": "Observability",
                    "dateModified": "2026-11-25T17:46:29+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/sampling#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/sampling#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/sampling#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is sampling?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace. Sampling means keeping only part of your traces or logs to control cost and volume. Storing every trace from a busy service can be very expensive, and most of them look the same."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "How is sampling used in practice?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "Head sampling decides at the start of a request, for example keeping one percent. It is cheap but random, so it may drop the rare interesting ones. Tail sampling decides after the request finishes, so you can keep every error and every slow request while sampling the normal ones."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with sampling?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "A practical rule is to keep all errors and slow requests, and a small share of healthy traffic. The OpenTelemetry Collector supports tail sampling. Metrics should not be sampled this way; they are cheap and you want complete numbers. Make sure dashboards that count from traces account for the sample rate."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What does an example of sampling look like?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "sample 100% of errors, 1% of healthy traces"
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/distributed-tracing#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/prometheus-configuration#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/grafana-dashboards#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/logging-en-monitoring#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/sampling#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "sampling"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/sampling#dataset",
                "name": "sampling",
                "description": "Keeping only a fraction of traces/logs to control cost. Head sampling decides up front; tail sampling decides after seeing the whole trace.",
                "url": "https://delaparra-services.nl/knowledge-hub/sampling",
                "identifier": "https://delaparra-services.nl/knowledge-hub/sampling#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/sampling#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "Observability",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:29+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "sampling.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "sampling.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "sampling.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "sampling.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "sampling.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "sampling-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/sampling/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:29+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}