{
  "id": "task_libraries:tracing/python",
  "path": "/exapedia/python-tracing-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python tracing libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python tracing libraries record spans that show how a request moves through an application and the services it calls. An SDK creates each span with timing and context before an exporter sends it to a backend such as an OpenTelemetry collector. These libraries let developers find slow calls and failures in web services and AI agent runs."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python tracing libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#opentelemetry-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F121"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F122"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sentry-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langsmith",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ddtrace",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F168"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langfuse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#logfire",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mlflow-tracing",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aws-xray-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F228"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#opentelemetry-sdk",
          "label": [
            {
              "t": "text",
              "text": "opentelemetry-sdk"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F122"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "OpenTelemetry API integration",
            "OTLP trace export"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#opentelemetry-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F121"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sentry-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F136"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langsmith",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ddtrace",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F168"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#langfuse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#logfire",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mlflow-tracing",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#aws-xray-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F228"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "opentelemetry-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F121"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/open-telemetry/opentelemetry-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/opentelemetry-sdk"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/opentelemetry-sdk/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F122"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/opentelemetry-sdk/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F121"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mlflow/mlflow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F134"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _initialize_tracer_provider(disabled=False):\n    \"\"\"\n    Instantiate a tracer provider and set it as the global tracer provider.\n\n    Note that this function ALWAYS updates the global tracer provider, regardless of the current\n    state. It is the caller's responsibility to ensure that the tracer provider is initialized\n    only once, and update the _INITIALIZED flag accordingly.\n    \"\"\"\n    processors = _get_span_processors(disabled=disabled)\n    if not processors:\n        provider.set(trace.NoOpTracerProvider())\n        return\n\n    # Demote the \"Failed to detach context\" log raised by the OpenTelemetry logger to DEBUG\n    # level so that it does not show up in the user's console. This warning may indicate\n    # some incorrect context handling, but in many cases just false positive that does not\n    # cause any issue in the generated trace.\n    # Note that we need to apply it permanently rather than just the scope of prediction call,\n    # because the exception can happen for streaming case, where the error log might be\n    # generated when the iterator is consumed and we don't know when it will happen.\n    suppress_warning(\"opentelemetry.context\", \"Failed to detach context\")\n\n    # These Otel warnings are occasionally raised in a valid case, e.g. we timeout a trace\n    # but some spans are still active. We suppress them because they are not actionable.\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Setting attribute on ended span\")\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Calling end() on an ended span\")\n\n    # When using the global tracer provider mode (MLFLOW_USE_DEFAULT_TRACER_PROVIDER=false),\n    # check if a TracerProvider is already set (e.g., set with `set_tracer_provider` API for\n    # Uvicorn, FastAPI, etc.). If so, add MLflow's span processors to the existing provider\n    # instead of replacing it. This enables unified tracing where both external and MLflow spans\n    # are captured in the same trace.\n    if not MLFLOW_USE_DEFAULT_TRACER_PROVIDER.get():\n        existing_provider = trace.get_tracer_provider()\n        if isinstance(existing_provider, TracerProvider):\n            _logger.debug(\n                \"An existing TracerProvider is detected. Adding MLflow's span processors \"\n                \"to the existing provider for unified tracing.\"\n            )\n            try:\n                existing_processors = set(existing_provider._active_span_processor._span_processors)\n                for processor in processors:\n                    if not any(isinstance(p, type(processor)) for p in existing_processors):\n                        existing_provider.add_span_processor(processor)\n                return\n            except Exception as e:\n                _logger.debug(\n                    f\"An error occurred while adding span processors to the existing provider: {e}.\"\n                    \" Overriding the existing provider with MLflow trace provider.\",\n                    exc_info=True,\n                )\n\n    # NB: If otel resource env vars are set explicitly, don't create an empty resource\n    # so that they are propagated to otel spans.\n    otel_service_name = os.environ.get(\"OTEL_SERVICE_NAME\")\n    otel_resource_attributes = os.environ.get(\"OTEL_RESOURCE_ATTRIBUTES\")\n    resource = None\n    sdk_attributes = {\n        \"telemetry.sdk.language\": \"python\",\n        \"telemetry.sdk.name\": \"mlflow\",\n        \"telemetry.sdk.version\": mlflow.__version__,\n    }\n    if not otel_service_name and not otel_resource_attributes:\n        # Setting an empty resource to avoid triggering resource aggregation, which causes\n        # an issue in LiteLLM tracing: https://github.com/mlflow/mlflow/issues/16296\n        # Add telemetry resource: https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk\n        resource = Resource(sdk_attributes)\n    else:\n        # Update the env var to let otel initialize the resource with MLflow's SDK attributes\n        attributes = {**_parse_otel_resource_attributes(otel_resource_attributes), **sdk_attributes}\n        os.environ[\"OTEL_RESOURCE_ATTRIBUTES\"] = \",\".join([\n            f\"{k}={v}\" for k, v in attributes.items()\n        ])\n\n    if MLFLOW_TRACE_USE_ISOLATED_RANDOM_ID_GENERATOR.get():\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n            id_generator=_IsolatedRandomIdGenerator(),\n        )\n    else:\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n        )\n    for processor in processors:\n        tracer_provider.add_span_processor(processor)\n\n    provider.set(tracer_provider)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mlflow/mlflow/blob/6976fb3d588ac525e00e59dda7e1aaaa384089f1/mlflow/tracing/provider.py#L707-L795",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20opentelemetry-sdk%20to%20configure%20span%20processors%2C%20propagate%20active%20trace%20context%20and%20tag%20application%20operations&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F121"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor, ConsoleSpanExporter\nprovider = TracerProvider()\nprovider.add_span_processor(SimpleSpanProcessor(ConsoleSpanExporter()))\ntracer = provider.get_tracer(__name__)\nwith tracer.start_as_current_span('example'):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://opentelemetry.io/docs/languages/python/instrumentation/",
                  "label": [
                    {
                      "t": "text",
                      "text": "instrumentation.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F126"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "sentry-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F136"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/getsentry/sentry-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/sentry-sdk"
            },
            {
              "label": "Docs",
              "href": "https://docs.sentry.io/platforms/python/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.sentry.io/platforms/python/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F136"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/home-assistant/core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _init_sdk():\n    \"\"\"Initialize the Sentry SDK.\"\"\"\n    sentry_sdk.init(\n        dsn=entry.data[CONF_DSN],\n        environment=entry.options.get(CONF_ENVIRONMENT),\n        integrations=[\n            sentry_logging,\n            AioHttpIntegration(),\n            SqlalchemyIntegration(),\n        ],\n        release=current_version,\n        before_send=lambda event, hint: process_before_send(\n            hass,\n            entry.options,\n            channel,\n            huuid,\n            system_info,\n            custom_components,\n            event,\n            hint,\n        ),\n        **tracing,\n    )",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/home-assistant/core/blob/d0ccc62cfc198f25db6ec5c6b228337e3207d047/homeassistant/components/sentry/__init__.py#L81-L103",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20sentry-sdk%20to%20configure%20span%20processors%2C%20propagate%20active%20trace%20context%20and%20tag%20application%20operations&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F136"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nimport sentry_sdk\nsentry_sdk.init(dsn=os.environ['SENTRY_DSN'], traces_sample_rate=1.0)\nwith sentry_sdk.start_transaction(op='task', name='example'):\n    pass\nsentry_sdk.flush()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.sentry.io/platforms/python/tracing/instrumentation/custom-instrumentation/",
                  "label": [
                    {
                      "t": "text",
                      "text": "custom-instrumentation.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F141"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "langsmith",
          "name": [
            {
              "t": "fact",
              "fact": "F151"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/langchain-ai/langsmith-sdk"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/langsmith"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/langsmith/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F158"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/langsmith/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _persist_run_single(self, run: Run) -> None:\n    \"\"\"Persist a run.\"\"\"\n    if run.extra.get(\"__disabled\"):\n        return\n    try:\n        run.extra[\"runtime\"] = get_runtime_environment()\n        run.tags = self._get_tags(run)\n        _patch_missing_metadata(self, run)\n        if run.ls_client is not self.client:\n            run.ls_client = self.client\n        run.post()\n    except Exception as e:\n        # Errors are swallowed by the thread executor so we need to log them here\n        log_error_once(\"post\", e)\n        raise",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain/blob/ced9bdb1a8899516b6c541fc0e19ab5f349aa0ea/libs/core/langchain_core/tracers/langchain.py#L356-L370",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=langsmith%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from langsmith import traceable\n\n@traceable\ndef example(text: str) -> str:\n    return text.upper()\n\nexample('hello')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.langchain.com/langsmith/annotate-code",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ddtrace",
          "name": [
            {
              "t": "fact",
              "fact": "F168"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/DataDog/dd-trace-py"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/ddtrace"
            },
            {
              "label": "Docs",
              "href": "https://ddtrace.readthedocs.io/en/stable/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F62"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ddtrace.readthedocs.io/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F168"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from ddtrace.trace import tracer\nwith tracer.trace('example'):\n    pass\ntracer.shutdown()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ddtrace.readthedocs.io/en/stable/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "advanced_usage.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20ddtrace%20to%20configure%20span%20processors%2C%20propagate%20active%20trace%20context%20and%20tag%20application%20operations&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F168"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F173"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "langfuse",
          "name": [
            {
              "t": "fact",
              "fact": "F179"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/langfuse/langfuse-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/langfuse"
            },
            {
              "label": "Docs",
              "href": "https://langfuse.com/docs/observability/sdk/overview"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F186"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://langfuse.com/docs/observability/sdk/overview",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/deepset-ai/haystack-core-integrations",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_span(self, context: SpanContext) -> LangfuseSpan:\n    \"\"\"Create a Langfuse span based on the given context.\"\"\"\n    if self.tracer is None:\n        message = (\n            \"Tracer is not initialized. \"\n            \"Make sure the environment variable HAYSTACK_CONTENT_TRACING_ENABLED is set to true before \"\n            \"importing Haystack.\"\n        )\n        raise RuntimeError(message)\n\n    # Get external tracing context for root trace creation (correlation metadata)\n    tracing_ctx = tracing_context_var.get({})\n    if not context.parent_span:\n        root_span_type: Literal[\"agent\", \"span\"] = (\n            \"agent\" if context.operation_name == \"haystack.agent.run\" else \"span\"\n        )\n        trace_context: TraceContext | None = cast(\n            TraceContext, {\"trace_id\": tracing_ctx.get(\"trace_id\")} if tracing_ctx.get(\"trace_id\") else None\n        )\n\n        span_context_manager = self.tracer.start_as_current_observation(\n            trace_context=trace_context,\n            name=context.trace_name,\n            version=tracing_ctx.get(\"version\"),\n            as_type=root_span_type,\n        )\n        span = LangfuseSpan(span_context_manager)\n\n        if context.public:\n            span.raw_span().set_trace_as_public()\n\n        return span\n\n    span_type = None\n    name = context.name\n\n    # Agent spans carry no component tags, so they're matched by operation name\n    if context.operation_name == _AGENT_STEP_OPERATION:\n        span_type = \"chain\"\n        name = f\"agent step {context.tags.get(_AGENT_STEP_KEY)}\"\n    elif context.operation_name == _AGENT_STEP_LLM_OPERATION:\n        span_type = \"generation\"\n        name = \"llm\"\n    elif context.operation_name == _AGENT_STEP_TOOL_OPERATION:\n        span_type = \"tool\"\n        tool_name = context.tags.get(_TOOL_NAME_KEY)\n        name = f\"tool - {tool_name}\" if tool_name else \"tool\"\n    elif context.operation_name == \"haystack.agent.run\":\n        span_type = \"agent\"\n    elif context.component_type and context.component_type.endswith(\"Retriever\"):\n        span_type = \"retriever\"\n    elif context.component_type and context.component_type.endswith(\"Embedder\"):\n        span_type = \"embedding\"\n    elif context.component_type and context.component_type.endswith(\"Generator\"):\n        span_type = \"generation\"\n\n    if span_type:\n        return LangfuseSpan(\n            self.tracer.start_as_current_observation(name=name, as_type=cast(ObservationSpanType, span_type))\n        )\n    else:\n        return LangfuseSpan(self.tracer.start_as_current_observation(name=name))",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/deepset-ai/haystack-core-integrations/blob/9d2a68d636551a2eddd30304a86e624b8189de27/integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py#L425-L486",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=langfuse%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F179"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from langfuse import get_client\nlangfuse = get_client()\nwith langfuse.start_as_current_observation(as_type='span', name='example'):\n    pass\nlangfuse.flush()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://langfuse.com/docs/observability/sdk/instrumentation",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "logfire",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pydantic/logfire"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/logfire"
            },
            {
              "label": "Docs",
              "href": "https://pydantic.dev/docs/logfire/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F87"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pydantic.dev/docs/logfire/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pydantic/pydantic-ai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def main():\n    async with AsyncClient() as client:\n        logfire.instrument_httpx(client, capture_all=True)\n        deps = Deps(client=client)\n        result = await weather_agent.run(\n            'What is the weather like in London and in Wiltshire?', deps=deps\n        )\n        print('Response:', result.output)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pydantic/pydantic-ai/blob/657a0664b3aaf62b337d18aa6f9055b02a1708dc/examples/pydantic_ai_examples/weather_agent.py#L96-L103",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F208"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20logfire%20to%20configure%20span%20processors%2C%20propagate%20active%20trace%20context%20and%20tag%20application%20operations&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import logfire\nlogfire.configure(send_to_logfire=False)\nwith logfire.span('example'):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://logfire.pydantic.dev/docs/reference/api/logfire/",
                  "label": [
                    {
                      "t": "text",
                      "text": "logfire.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mlflow-tracing",
          "name": [
            {
              "t": "fact",
              "fact": "F211"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/mlflow/mlflow"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/mlflow-tracing"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/mlflow-tracing/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/mlflow-tracing/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F211"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/guardrails-ai/guardrails",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F226"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _instrument_runner_step(self, runner_step: Callable[..., Iteration]):\n    @wraps(runner_step)\n    def trace_step_wrapper(*args, **kwargs) -> Iteration:\n        with mlflow.start_span(\n            name=\"guardrails/guard/step\",\n            span_type=\"step\",\n            attributes={\n                \"guardrails.version\": GUARDRAILS_VERSION,\n                \"type\": \"guardrails/guard/step\",\n            },\n        ) as step_span:\n            try:\n                response = runner_step(*args, **kwargs)\n                add_step_attributes(step_span, response, *args, **kwargs)  # type: ignore\n                return response\n            except Exception as e:\n                step_span.set_status(status=SpanStatusCode.ERROR)\n                add_step_attributes(step_span, None, *args, **kwargs)  # type: ignore\n                raise e\n\n    return trace_step_wrapper",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/guardrails-ai/guardrails/blob/06d0ff2c5f9bcb493d976b76f885e37e41ce845d/guardrails/integrations/databricks/ml_flow_instrumentor.py#L206-L226",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=mlflow-tracing%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F211"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nos.environ['OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'] = 'http://localhost:4318/v1/traces'\nos.environ['OTEL_EXPORTER_OTLP_TRACES_PROTOCOL'] = 'http/protobuf'\nimport mlflow\nwith mlflow.start_span(name='example'):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mlflow.org/docs/latest/genai/tracing/opentelemetry/export/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "aws-xray-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F228"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/aws/aws-xray-sdk-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/aws-xray-sdk"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/aws-xray-sdk/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F235"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/aws-xray-sdk/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F228"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/aws-powertools/powertools-lambda-python",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F244"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@functools.wraps(lambda_handler)\ndef decorate(event, context, **kwargs):\n    with self.provider.in_subsegment(name=f\"## {lambda_handler_name}\") as subsegment:\n        try:\n            logger.debug(\"Calling lambda handler\")\n            response = lambda_handler(event, context, **kwargs)\n            logger.debug(\"Received lambda handler response successfully\")\n            self._add_response_as_metadata(\n                method_name=lambda_handler_name,\n                data=response,\n                subsegment=subsegment,\n                capture_response=capture_response,\n            )\n        except Exception as err:\n            logger.exception(f\"Exception received from {lambda_handler_name}\")\n            self._add_full_exception_as_metadata(\n                method_name=lambda_handler_name,\n                error=err,\n                subsegment=subsegment,\n                capture_error=capture_error,\n            )\n\n            raise\n        finally:\n            cold_start = _is_cold_start()\n            logger.debug(\"Annotating cold start\")\n            subsegment.put_annotation(key=\"ColdStart\", value=cold_start)\n\n            if self.service:\n                subsegment.put_annotation(key=\"Service\", value=self.service)\n\n        return response",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/aws-powertools/powertools-lambda-python/blob/19c07985e8068ec1a8b97e9d8f2a0a1304a96c6d/aws_lambda_powertools/tracing/tracer.py#L346-L377",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=aws-xray-sdk%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F228"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from aws_xray_sdk.core import xray_recorder\nxray_recorder.configure(service='example')\nwith xray_recorder.in_segment('example'):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/aws/aws-xray-sdk-python/2.16.0/aws_xray_sdk/core/recorder.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "recorder.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python tracing library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#opentelemetry-sdk",
          "label": [
            {
              "t": "text",
              "text": "opentelemetry-sdk"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits tracing exported through standard OTLP to compatible backends. "
        },
        {
          "t": "link",
          "href": "#sentry-sdk",
          "label": [
            {
              "t": "text",
              "text": "Sentry SDK"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits applications that track errors and spans together. "
        },
        {
          "t": "link",
          "href": "#langfuse",
          "label": [
            {
              "t": "text",
              "text": "Langfuse"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#langsmith",
          "label": [
            {
              "t": "text",
              "text": "LangSmith"
            }
          ]
        },
        {
          "t": "text",
          "text": " suit tracing LLM applications and agents."
        }
      ]
    },
    {
      "q": "What is Langfuse?",
      "a": [
        {
          "t": "link",
          "href": "#langfuse",
          "label": [
            {
              "t": "text",
              "text": "Langfuse"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a Python SDK for LLM observability and tracing, with datasets, experiments, evaluation, and prompt management."
        }
      ]
    },
    {
      "q": "What is LangSmith?",
      "a": [
        {
          "t": "link",
          "href": "#langsmith",
          "label": [
            {
              "t": "text",
              "text": "LangSmith"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a client library that connects to the LangSmith observability and evaluation platform."
        }
      ]
    },
    {
      "q": "What is Logfire?",
      "a": [
        {
          "t": "link",
          "href": "#logfire",
          "label": [
            {
              "t": "text",
              "text": "Logfire"
            }
          ]
        },
        {
          "t": "text",
          "text": " creates structured logs and spans using OpenTelemetry. It sends data to its cloud by default. Its configuration can point to another OTLP backend instead."
        }
      ]
    },
    {
      "q": "OpenTelemetry vs Sentry: which should I use?",
      "a": [
        {
          "t": "link",
          "href": "#opentelemetry-sdk",
          "label": [
            {
              "t": "text",
              "text": "opentelemetry-sdk"
            }
          ]
        },
        {
          "t": "text",
          "text": " creates spans and exports them through OTLP to compatible collectors and backends. "
        },
        {
          "t": "link",
          "href": "#sentry-sdk",
          "label": [
            {
              "t": "text",
              "text": "Sentry SDK"
            }
          ]
        },
        {
          "t": "text",
          "text": " captures errors and spans for Sentry, with automatic instrumentation for supported frameworks."
        }
      ]
    },
    {
      "q": "What is ddtrace?",
      "a": [
        {
          "t": "link",
          "href": "#ddtrace",
          "label": [
            {
              "t": "text",
              "text": "ddtrace"
            }
          ]
        },
        {
          "t": "text",
          "text": " adds manual and automatic tracing to Python applications for Datadog. Automatic tracing must start early in the process."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, opentelemetry-sdk",
      "display": "OpenTelemetry SDK",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, opentelemetry-sdk",
      "display": "327.4M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, opentelemetry-sdk",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, opentelemetry-sdk",
      "display": "1.45.2, Oct 2026",
      "asOf": "2026-10-29"
    },
    "F5": {
      "label": "Package release date, opentelemetry-sdk",
      "display": "Oct 2026",
      "asOf": "2026-10-29"
    },
    "F6": {
      "label": "Repository stars, opentelemetry-sdk",
      "display": "2.7K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Manual spans, opentelemetry-sdk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Auto instrumentation, opentelemetry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Async support, opentelemetry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "OpenTelemetry export, opentelemetry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, opentelemetry-sdk",
      "display": "pip install opentelemetry-sdk",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, opentelemetry-sdk",
      "display": "Creates spans and exports Python application telemetry through configurable processors and exporters.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, opentelemetry-sdk",
      "display": "Configurable span processing",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, opentelemetry-sdk",
      "display": "Choose the span processor and exporter for the tracing pipeline.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, opentelemetry-sdk",
      "display": "Exports through standard OTLP",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, opentelemetry-sdk",
      "display": "Send traces to an OTLP-compatible collector or backend.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, opentelemetry-sdk",
      "display": "Auto instrumentation needs extra packages",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, opentelemetry-sdk",
      "display": "Install a distro and the instrumentors for the frameworks the application uses.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, opentelemetry-sdk",
      "display": "OTLP exporters install separately",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, opentelemetry-sdk",
      "display": "Add the HTTP or gRPC exporter package before configuring its endpoint.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, opentelemetry-sdk",
      "display": "from opentelemetry import trace\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import (\n    BatchSpanProcessor,\n    ConsoleSpanExporter,\n)\n\nprovider = TracerProvider()\nprocessor = BatchSpanProcessor(ConsoleSpanExporter())\nprovider.add_span_processor(processor)\n\n# Sets the global default tracer provider\ntrace.set_tracer_provider(provider)\n\n# Creates a tracer from the global tracer provider\ntracer = trace.get_tracer(\"my.tracer.name\")\n\n\ndef do_work():\n    with tracer.start_as_current_span(\"span-name\") as span:\n        # do some work that 'span' will track\n        print(\"doing some work...\")\n        # When the 'with' block goes out of scope, 'span' is closed for you\n\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, opentelemetry-sdk",
      "display": "def _initialize_tracer_provider(disabled=False):\n    # ...\n    processors = _get_span_processors(disabled=disabled)\n    if not processors:\n        provider.set(trace.NoOpTracerProvider())\n        return\n\n    # Demote the \"Failed to detach context\" log raised by the OpenTelemetry logger to DEBUG\n    # level so that it does not show up in the user's console. This warning may indicate\n    # some incorrect context handling, but in many cases just false positive that does not\n    # cause any issue in the generated trace.\n    # Note that we need to apply it permanently rather than just the scope of prediction call,\n    # because the exception can happen for streaming case, where the error log might be\n    # generated when the iterator is consumed and we don't know when it will happen.\n    suppress_warning(\"opentelemetry.context\", \"Failed to detach context\")\n\n    # These Otel warnings are occasionally raised in a valid case, e.g. we timeout a trace\n    # but some spans are still active. We suppress them because they are not actionable.\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Setting attribute on ended span\")\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Calling end() on an ended span\")\n\n    # When using the global tracer provider mode (MLFLOW_USE_DEFAULT_TRACER_PROVIDER=false),\n    # check if a TracerProvider is already set (e.g., set with `set_tracer_provider` API for\n    # Uvicorn, FastAPI, etc.). If so, add MLflow's span processors to the existing provider\n    # instead of replacing it. This enables unified tracing where both external and MLflow spans\n    # are captured in the same trace.\n    if not MLFLOW_USE_DEFAULT_TRACER_PROVIDER.get():\n        existing_provider = trace.get_tracer_provider()\n        if isinstance(existing_provider, TracerProvider):\n            _logger.debug(\n                \"An existing TracerProvider is detected. Adding MLflow's span processors \"\n                \"to the existing provider for unified tracing.\"\n            )\n            try:\n                existing_processors = set(existing_provider._active_span_processor._span_processors)\n                for processor in processors:\n                    if not any(isinstance(p, type(processor)) for p in existing_processors):\n                        existing_provider.add_span_processor(processor)\n                return\n            except Exception as e:\n                _logger.debug(\n                    f\"An error occurred while adding span processors to the existing provider: {e}.\"\n                    \" Overriding the existing provider with MLflow trace provider.\",\n                    exc_info=True,\n                )\n\n    # NB: If otel resource env vars are set explicitly, don't create an empty resource\n    # so that they are propagated to otel spans.\n    otel_service_name = os.environ.get(\"OTEL_SERVICE_NAME\")\n    otel_resource_attributes = os.environ.get(\"OTEL_RESOURCE_ATTRIBUTES\")\n    resource = None\n    sdk_attributes = {\n        \"telemetry.sdk.language\": \"python\",\n        \"telemetry.sdk.name\": \"mlflow\",\n        \"telemetry.sdk.version\": mlflow.__version__,\n    }\n    if not otel_service_name and not otel_resource_attributes:\n        # Setting an empty resource to avoid triggering resource aggregation, which causes\n        # an issue in LiteLLM tracing: https://github.com/mlflow/mlflow/issues/16296\n        # Add telemetry resource: https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk\n        resource = Resource(sdk_attributes)\n    else:\n        # Update the env var to let otel initialize the resource with MLflow's SDK attributes\n        attributes = {**_parse_otel_resource_attributes(otel_resource_attributes), **sdk_attributes}\n        os.environ[\"OTEL_RESOURCE_ATTRIBUTES\"] = \",\".join([\n            f\"{k}={v}\" for k, v in attributes.items()\n        ])\n\n    if MLFLOW_TRACE_USE_ISOLATED_RANDOM_ID_GENERATOR.get():\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n            id_generator=_IsolatedRandomIdGenerator(),\n        )\n    else:\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n        )\n    for processor in processors:\n        tracer_provider.add_span_processor(processor)\n\n    provider.set(tracer_provider)\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, opentelemetry-sdk",
      "display": "provider.py · _initialize_tracer_provider()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, opentelemetry-sdk",
      "display": "mlflow/mlflow",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, mlflow/mlflow",
      "display": "28.8K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, mlflow/mlflow",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F27": {
      "label": "Library name, sentry-sdk",
      "display": "Sentry SDK",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, sentry-sdk",
      "display": "150.3M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, sentry-sdk",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, sentry-sdk",
      "display": "2.75.0, Nov 2026",
      "asOf": "2026-11-12"
    },
    "F31": {
      "label": "Package release date, sentry-sdk",
      "display": "Nov 2026",
      "asOf": "2026-11-12"
    },
    "F32": {
      "label": "Repository stars, sentry-sdk",
      "display": "2.2K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Manual spans, sentry-sdk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Auto instrumentation, sentry-sdk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Async support, sentry-sdk",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, sentry-sdk",
      "display": "pip install sentry-sdk",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, sentry-sdk",
      "display": "Captures application errors and tracing spans with Python framework integrations.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, sentry-sdk",
      "display": "Instruments supported frameworks automatically",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, sentry-sdk",
      "display": "Supported HTTP and database operations become spans through enabled integrations.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, sentry-sdk",
      "display": "Adds custom nested spans",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, sentry-sdk",
      "display": "Wrap application operations in spans inside an active transaction.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, sentry-sdk",
      "display": "Custom spans need a transaction",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, sentry-sdk",
      "display": "Create a transaction when the framework integration does not create one.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, sentry-sdk",
      "display": "Tracing needs sampling configuration",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, sentry-sdk",
      "display": "Set traces_sample_rate for the share of traces sent to Sentry.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, sentry-sdk",
      "display": "import sentry_sdk\nsentry_sdk.init(\n    dsn=\"https://<key>@o<orgId>.ingest.sentry.io/<projectId>\",\n\n    # Check https://docs.sentry.io/platforms/python/data-management/data-collected/ to configure what data is collected\n    data_collection={\n        \"user_info\": True,\n    },\n\n    # Enables Tracing.\n    # Set to 1.0 to capture 100% of spans for tracing.\n    # We recommend reducing this value in production.\n    traces_sample_rate=1.0,\n\n    # Enables Profiling.\n    # Set to 1.0 to profile 100% of sessions.\n    profile_session_sample_rate=1.0,\n    # Profiles are collected while a transaction is active.\n    profile_lifecycle=\"trace\",\n)\n\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, sentry-sdk",
      "display": "def _init_sdk():\n    # ...\n    sentry_sdk.init(\n        dsn=entry.data[CONF_DSN],\n        environment=entry.options.get(CONF_ENVIRONMENT),\n        integrations=[\n            sentry_logging,\n            AioHttpIntegration(),\n            SqlalchemyIntegration(),\n        ],\n        release=current_version,\n        before_send=lambda event, hint: process_before_send(\n            hass,\n            entry.options,\n            channel,\n            huuid,\n            system_info,\n            custom_components,\n            event,\n            hint,\n        ),\n        **tracing,\n    )\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, sentry-sdk",
      "display": "__init__.py · _init_sdk()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, sentry-sdk",
      "display": "home-assistant/core",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, home-assistant/core",
      "display": "92.3K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, home-assistant/core",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F52": {
      "label": "Library name, ddtrace",
      "display": "ddtrace",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, ddtrace",
      "display": "45.5M",
      "asOf": "2026-11-16"
    },
    "F54": {
      "label": "License, ddtrace",
      "display": "LICENSE.BSD3",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, ddtrace",
      "display": "4.17.0, Nov 2026",
      "asOf": "2026-11-12"
    },
    "F56": {
      "label": "Package release date, ddtrace",
      "display": "Nov 2026",
      "asOf": "2026-11-12"
    },
    "F57": {
      "label": "Repository stars, ddtrace",
      "display": "655",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Manual spans, ddtrace",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Auto instrumentation, ddtrace",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Async support, ddtrace",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, ddtrace",
      "display": "pip install ddtrace",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, ddtrace",
      "display": "Adds manual and automatic tracing to Python applications for Datadog.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, ddtrace",
      "display": "Wraps selected code blocks",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, ddtrace",
      "display": "Use the tracer context manager around an operation that needs a span.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, ddtrace",
      "display": "Propagates context across async tasks",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, ddtrace",
      "display": "New tasks inherit the active trace context by default.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, ddtrace",
      "display": "Spans belong to their execution",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, ddtrace",
      "display": "Pass and activate the context when continuing a trace across execution boundaries.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, ddtrace",
      "display": "Automatic tracing must start early",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, ddtrace",
      "display": "Import ddtrace.auto before application imports when using that initialization route.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, ddtrace",
      "display": "import threading, time\nfrom ddtrace.trace import tracer\n\ndef _target(trace_ctx):\n    tracer.context_provider.activate(trace_ctx)\n    with tracer.trace(\"second_thread\"):\n        # `second_thread`s parent will be the `main_thread` span\n        time.sleep(1)\n\nwith tracer.trace(\"main_thread\") as root_span:\n    # sample so the sampling_priority is the same across the trace\n    tracer.sample(tracer.current_root_span())\n    thread = threading.Thread(target=_target, args=(tracer.current_trace_context(),))\n    thread.start()\n    thread.join()\n\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, ddtrace",
      "display": "def get_active_span() -> object:\n    # ...\n    try:\n        current_span_fn: Final = getattr(tracer, \"current_span\", None)\n        if callable(current_span_fn):\n            current_span: Final = current_span_fn()\n            if current_span is not None:\n                return current_span\n\n        current_root_span_fn: Final = getattr(tracer, \"current_root_span\", None)\n        if callable(current_root_span_fn):\n            return current_root_span_fn()\n    except Exception:\n        return None\n    return None\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, ddtrace",
      "display": "dd_tracing.py · get_active_span()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, ddtrace",
      "display": "BerriAI/litellm",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, BerriAI/litellm",
      "display": "63.3K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, BerriAI/litellm",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F77": {
      "label": "Library name, logfire",
      "display": "Logfire",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, logfire",
      "display": "18.1M",
      "asOf": "2026-11-16"
    },
    "F79": {
      "label": "License, logfire",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, logfire",
      "display": "5.6.0, Nov 2026",
      "asOf": "2026-11-11"
    },
    "F81": {
      "label": "Package release date, logfire",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F82": {
      "label": "Repository stars, logfire",
      "display": "4.6K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Manual spans, logfire",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Auto instrumentation, logfire",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "OpenTelemetry export, logfire",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, logfire",
      "display": "pip install logfire",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, logfire",
      "display": "Creates structured logs and spans using OpenTelemetry and configurable telemetry backends.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, logfire",
      "display": "Exports to alternative backends",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, logfire",
      "display": "Configure an OTLP endpoint for a compatible telemetry backend.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, logfire",
      "display": "Traces selected modules automatically",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, logfire",
      "display": "Install auto tracing before importing the application modules to trace.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, logfire",
      "display": "Cloud delivery starts enabled",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, logfire",
      "display": "Set send_to_logfire=False when sending only to another backend.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, logfire",
      "display": "Auto tracing precedes module imports",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, logfire",
      "display": "Install auto tracing before importing the modules it should instrument.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, logfire",
      "display": "import os\n\nimport logfire\n\n# Jaeger only supports traces, not metrics, so only set the traces endpoint\n# to avoid errors about failing to export metrics.\n# Use port 4318 for HTTP, not 4317 for gRPC.\ntraces_endpoint = 'http://localhost:4318/v1/traces'\nos.environ['OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'] = traces_endpoint\n\nlogfire.configure(\n    # Setting a service name is good practice in general, but especially\n    # important for Jaeger, otherwise spans will be labeled as 'unknown_service'\n    service_name='my_logfire_service',\n    # Sending to Logfire is on by default regardless of the OTEL env vars.\n    # Keep this line here if you don't want to send to both Jaeger and Logfire.\n    send_to_logfire=False,\n)\n\nwith logfire.span('This is a span'):\n    logfire.info('Logfire logs are also actually just spans!')\n\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "A configurable OpenTelemetry pipeline",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose opentelemetry-sdk",
      "display": "explicit provider and processor configuration",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "a configurable OpenTelemetry pipeline",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Datadog tracing across async tasks",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose ddtrace",
      "display": "automatic task context propagation",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "datadog tracing across async tasks",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need",
      "display": "Framework traces alongside application errors",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Why choose sentry-sdk",
      "display": "supported framework integrations",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need in introduction",
      "display": "framework traces alongside application errors",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "An alternative OTLP backend",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose logfire",
      "display": "configurable standard telemetry export",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "an alternative OTLP backend",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Page introduction",
      "display": "Python tracing libraries let backend developers record execution spans for application diagnostics.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "FAQ: What is the best Python tracing library?",
      "display": "Choose OpenTelemetry SDK for explicit provider and span-processor configuration.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: What is the best Python tracing library?",
      "display": "ddtrace propagates the active context into newly created async tasks.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: What is the best Python tracing library?",
      "display": "Sentry automatically instruments supported framework operations.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: What is the best Python tracing library?",
      "display": "Logfire supports alternative OpenTelemetry-compatible backends.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Can I send OpenTelemetry traces to different backends?",
      "display": "OTLP exporters work with compatible collectors and backends; install and configure the chosen exporter.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Does the OpenTelemetry SDK instrument my application automatically?",
      "display": "The Python zero-code route requires a distro package and the appropriate instrumentation packages.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: How do Datadog traces cross thread boundaries?",
      "display": "Pass the span context and activate it in the receiving execution; finish each span in its original execution.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Why are my custom Sentry spans missing?",
      "display": "Sentry creates spans within an existing transaction; create one manually when the framework does not.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Why are my custom Sentry spans missing?",
      "display": "Configure trace sampling to enable sending traces.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Can Logfire send traces only to a local backend?",
      "display": "Configure the alternative OTLP endpoint and disable sending to Logfire in the example configuration.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: When should Logfire auto tracing be installed?",
      "display": "Install auto tracing before importing the modules that it should instrument.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "Library name, opentelemetry-sdk",
      "display": "opentelemetry-sdk",
      "asOf": "2026-11-20"
    },
    "F122": {
      "label": "Monthly downloads, opentelemetry-sdk",
      "display": "342.4M",
      "asOf": "2026-11-20"
    },
    "F123": {
      "label": "License, opentelemetry-sdk",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F124": {
      "label": "Package release, opentelemetry-sdk",
      "display": "1.45.2",
      "asOf": "2026-11-20"
    },
    "F125": {
      "label": "Package release date, opentelemetry-sdk",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Install, opentelemetry-sdk",
      "display": "pip install opentelemetry-sdk",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Quickstart, opentelemetry-sdk",
      "display": "from opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor, ConsoleSpanExporter\nprovider = TracerProvider()\nprovider.add_span_processor(SimpleSpanProcessor(ConsoleSpanExporter()))\ntracer = provider.get_tracer(__name__)\nwith tracer.start_as_current_span('example'):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Repository stars, opentelemetry-sdk",
      "display": "2.7K",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "OpenTelemetry API integration, opentelemetry-sdk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "OTLP trace export, opentelemetry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Backend setup, opentelemetry-sdk",
      "display": "SDK plus explicitly configured span processor/exporter",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Project function, opentelemetry-sdk",
      "display": "def _initialize_tracer_provider(disabled=False):\n    \"\"\"\n    Instantiate a tracer provider and set it as the global tracer provider.\n\n    Note that this function ALWAYS updates the global tracer provider, regardless of the current\n    state. It is the caller's responsibility to ensure that the tracer provider is initialized\n    only once, and update the _INITIALIZED flag accordingly.\n    \"\"\"\n    processors = _get_span_processors(disabled=disabled)\n    if not processors:\n        provider.set(trace.NoOpTracerProvider())\n        return\n\n    # Demote the \"Failed to detach context\" log raised by the OpenTelemetry logger to DEBUG\n    # level so that it does not show up in the user's console. This warning may indicate\n    # some incorrect context handling, but in many cases just false positive that does not\n    # cause any issue in the generated trace.\n    # Note that we need to apply it permanently rather than just the scope of prediction call,\n    # because the exception can happen for streaming case, where the error log might be\n    # generated when the iterator is consumed and we don't know when it will happen.\n    suppress_warning(\"opentelemetry.context\", \"Failed to detach context\")\n\n    # These Otel warnings are occasionally raised in a valid case, e.g. we timeout a trace\n    # but some spans are still active. We suppress them because they are not actionable.\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Setting attribute on ended span\")\n    suppress_warning(\"opentelemetry.sdk.trace\", \"Calling end() on an ended span\")\n\n    # When using the global tracer provider mode (MLFLOW_USE_DEFAULT_TRACER_PROVIDER=false),\n    # check if a TracerProvider is already set (e.g., set with `set_tracer_provider` API for\n    # Uvicorn, FastAPI, etc.). If so, add MLflow's span processors to the existing provider\n    # instead of replacing it. This enables unified tracing where both external and MLflow spans\n    # are captured in the same trace.\n    if not MLFLOW_USE_DEFAULT_TRACER_PROVIDER.get():\n        existing_provider = trace.get_tracer_provider()\n        if isinstance(existing_provider, TracerProvider):\n            _logger.debug(\n                \"An existing TracerProvider is detected. Adding MLflow's span processors \"\n                \"to the existing provider for unified tracing.\"\n            )\n            try:\n                existing_processors = set(existing_provider._active_span_processor._span_processors)\n                for processor in processors:\n                    if not any(isinstance(p, type(processor)) for p in existing_processors):\n                        existing_provider.add_span_processor(processor)\n                return\n            except Exception as e:\n                _logger.debug(\n                    f\"An error occurred while adding span processors to the existing provider: {e}.\"\n                    \" Overriding the existing provider with MLflow trace provider.\",\n                    exc_info=True,\n                )\n\n    # NB: If otel resource env vars are set explicitly, don't create an empty resource\n    # so that they are propagated to otel spans.\n    otel_service_name = os.environ.get(\"OTEL_SERVICE_NAME\")\n    otel_resource_attributes = os.environ.get(\"OTEL_RESOURCE_ATTRIBUTES\")\n    resource = None\n    sdk_attributes = {\n        \"telemetry.sdk.language\": \"python\",\n        \"telemetry.sdk.name\": \"mlflow\",\n        \"telemetry.sdk.version\": mlflow.__version__,\n    }\n    if not otel_service_name and not otel_resource_attributes:\n        # Setting an empty resource to avoid triggering resource aggregation, which causes\n        # an issue in LiteLLM tracing: https://github.com/mlflow/mlflow/issues/16296\n        # Add telemetry resource: https://opentelemetry.io/docs/specs/semconv/resource/#telemetry-sdk\n        resource = Resource(sdk_attributes)\n    else:\n        # Update the env var to let otel initialize the resource with MLflow's SDK attributes\n        attributes = {**_parse_otel_resource_attributes(otel_resource_attributes), **sdk_attributes}\n        os.environ[\"OTEL_RESOURCE_ATTRIBUTES\"] = \",\".join([\n            f\"{k}={v}\" for k, v in attributes.items()\n        ])\n\n    if MLFLOW_TRACE_USE_ISOLATED_RANDOM_ID_GENERATOR.get():\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n            id_generator=_IsolatedRandomIdGenerator(),\n        )\n    else:\n        tracer_provider = TracerProvider(\n            resource=resource,\n            sampler=_get_trace_sampler(),\n        )\n    for processor in processors:\n        tracer_provider.add_span_processor(processor)\n\n    provider.set(tracer_provider)",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Project source file, opentelemetry-sdk",
      "display": "mlflow/tracing/provider.py",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Project full_name, opentelemetry-sdk",
      "display": "mlflow/mlflow",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Project stargazers_count, opentelemetry-sdk",
      "display": "28.9K",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Library name, sentry-sdk",
      "display": "Sentry SDK",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Monthly downloads, sentry-sdk",
      "display": "157.0M",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "License, sentry-sdk",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Package release, sentry-sdk",
      "display": "2.75.0",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Package release date, sentry-sdk",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Install, sentry-sdk",
      "display": "pip install sentry-sdk",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Quickstart, sentry-sdk",
      "display": "import os\nimport sentry_sdk\nsentry_sdk.init(dsn=os.environ['SENTRY_DSN'], traces_sample_rate=1.0)\nwith sentry_sdk.start_transaction(op='task', name='example'):\n    pass\nsentry_sdk.flush()\n",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Repository stars, sentry-sdk",
      "display": "2.2K",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "OpenTelemetry API integration, sentry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "OTLP trace export, sentry-sdk",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "OTLP configuration, sentry-sdk",
      "display": "OTLPIntegration replaces separate native trace sampling setup",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Project function, sentry-sdk",
      "display": "def _init_sdk():\n    \"\"\"Initialize the Sentry SDK.\"\"\"\n    sentry_sdk.init(\n        dsn=entry.data[CONF_DSN],\n        environment=entry.options.get(CONF_ENVIRONMENT),\n        integrations=[\n            sentry_logging,\n            AioHttpIntegration(),\n            SqlalchemyIntegration(),\n        ],\n        release=current_version,\n        before_send=lambda event, hint: process_before_send(\n            hass,\n            entry.options,\n            channel,\n            huuid,\n            system_info,\n            custom_components,\n            event,\n            hint,\n        ),\n        **tracing,\n    )",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Project source file, sentry-sdk",
      "display": "homeassistant/components/sentry/__init__.py",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project full_name, sentry-sdk",
      "display": "home-assistant/core",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project stargazers_count, sentry-sdk",
      "display": "92.3K",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Library name, langsmith",
      "display": "LangSmith",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Monthly downloads, langsmith",
      "display": "94.9M",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "License, langsmith",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Package release, langsmith",
      "display": "0.15.0",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Package release date, langsmith",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Install, langsmith",
      "display": "pip install langsmith",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Quickstart, langsmith",
      "display": "from langsmith import traceable\n\n@traceable\ndef example(text: str) -> str:\n    return text.upper()\n\nexample('hello')\n",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Official description, langsmith",
      "display": "Connects to the LangSmith observability and evaluation platform.",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Quickstart source file, langsmith",
      "display": "docs/langsmith/annotate-code",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Repository stars, langsmith",
      "display": "1.1K",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "OpenTelemetry API integration, langsmith",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "OTLP trace export, langsmith",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Optional OpenTelemetry path, langsmith",
      "display": "otel extra and LANGSMITH_OTEL_ENABLED=true",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Project function, langsmith",
      "display": "def _persist_run_single(self, run: Run) -> None:\n    \"\"\"Persist a run.\"\"\"\n    if run.extra.get(\"__disabled\"):\n        return\n    try:\n        run.extra[\"runtime\"] = get_runtime_environment()\n        run.tags = self._get_tags(run)\n        _patch_missing_metadata(self, run)\n        if run.ls_client is not self.client:\n            run.ls_client = self.client\n        run.post()\n    except Exception as e:\n        # Errors are swallowed by the thread executor so we need to log them here\n        log_error_once(\"post\", e)\n        raise",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Project source file, langsmith",
      "display": "libs/core/langchain_core/tracers/langchain.py",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Project full_name, langsmith",
      "display": "langchain-ai/langchain",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Project stargazers_count, langsmith",
      "display": "149.9K",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Library name, ddtrace",
      "display": "ddtrace",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Monthly downloads, ddtrace",
      "display": "48.7M",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "License, ddtrace",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Package release, ddtrace",
      "display": "4.17.0",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Package release date, ddtrace",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Install, ddtrace",
      "display": "pip install ddtrace",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Quickstart, ddtrace",
      "display": "from ddtrace.trace import tracer\nwith tracer.trace('example'):\n    pass\ntracer.shutdown()\n",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Repository stars, ddtrace",
      "display": "655",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "OpenTelemetry API integration, ddtrace",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "OTLP trace export, ddtrace",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Trace backend transport, ddtrace",
      "display": "Datadog Agent payloads; not OTLP",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Library name, langfuse",
      "display": "Langfuse",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Monthly downloads, langfuse",
      "display": "31.7M",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "License, langfuse",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Package release, langfuse",
      "display": "5.2.0",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Package release date, langfuse",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Install, langfuse",
      "display": "pip install langfuse",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart, langfuse",
      "display": "from langfuse import get_client\nlangfuse = get_client()\nwith langfuse.start_as_current_observation(as_type='span', name='example'):\n    pass\nlangfuse.flush()\n",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Official description, langfuse",
      "display": "Traces LLM applications, with datasets, experiments, evaluation, and prompt management.",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Quickstart source file, langfuse",
      "display": "docs/observability/sdk/instrumentation",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Repository stars, langfuse",
      "display": "516",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "OpenTelemetry API integration, langfuse",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "OTLP trace export, langfuse",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Span context ownership, langfuse",
      "display": "start_as_current_observation updates active context; start_observation does not",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project function, langfuse",
      "display": "def create_span(self, context: SpanContext) -> LangfuseSpan:\n    \"\"\"Create a Langfuse span based on the given context.\"\"\"\n    if self.tracer is None:\n        message = (\n            \"Tracer is not initialized. \"\n            \"Make sure the environment variable HAYSTACK_CONTENT_TRACING_ENABLED is set to true before \"\n            \"importing Haystack.\"\n        )\n        raise RuntimeError(message)\n\n    # Get external tracing context for root trace creation (correlation metadata)\n    tracing_ctx = tracing_context_var.get({})\n    if not context.parent_span:\n        root_span_type: Literal[\"agent\", \"span\"] = (\n            \"agent\" if context.operation_name == \"haystack.agent.run\" else \"span\"\n        )\n        trace_context: TraceContext | None = cast(\n            TraceContext, {\"trace_id\": tracing_ctx.get(\"trace_id\")} if tracing_ctx.get(\"trace_id\") else None\n        )\n\n        span_context_manager = self.tracer.start_as_current_observation(\n            trace_context=trace_context,\n            name=context.trace_name,\n            version=tracing_ctx.get(\"version\"),\n            as_type=root_span_type,\n        )\n        span = LangfuseSpan(span_context_manager)\n\n        if context.public:\n            span.raw_span().set_trace_as_public()\n\n        return span\n\n    span_type = None\n    name = context.name\n\n    # Agent spans carry no component tags, so they're matched by operation name\n    if context.operation_name == _AGENT_STEP_OPERATION:\n        span_type = \"chain\"\n        name = f\"agent step {context.tags.get(_AGENT_STEP_KEY)}\"\n    elif context.operation_name == _AGENT_STEP_LLM_OPERATION:\n        span_type = \"generation\"\n        name = \"llm\"\n    elif context.operation_name == _AGENT_STEP_TOOL_OPERATION:\n        span_type = \"tool\"\n        tool_name = context.tags.get(_TOOL_NAME_KEY)\n        name = f\"tool - {tool_name}\" if tool_name else \"tool\"\n    elif context.operation_name == \"haystack.agent.run\":\n        span_type = \"agent\"\n    elif context.component_type and context.component_type.endswith(\"Retriever\"):\n        span_type = \"retriever\"\n    elif context.component_type and context.component_type.endswith(\"Embedder\"):\n        span_type = \"embedding\"\n    elif context.component_type and context.component_type.endswith(\"Generator\"):\n        span_type = \"generation\"\n\n    if span_type:\n        return LangfuseSpan(\n            self.tracer.start_as_current_observation(name=name, as_type=cast(ObservationSpanType, span_type))\n        )\n    else:\n        return LangfuseSpan(self.tracer.start_as_current_observation(name=name))",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project source file, langfuse",
      "display": "integrations/langfuse/src/haystack_integrations/tracing/langfuse/tracer.py",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project full_name, langfuse",
      "display": "deepset-ai/haystack-core-integrations",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project stargazers_count, langfuse",
      "display": "212",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Library name, logfire",
      "display": "Logfire",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Monthly downloads, logfire",
      "display": "19.0M",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "License, logfire",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Package release, logfire",
      "display": "5.6.0",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release date, logfire",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Install, logfire",
      "display": "pip install logfire",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart, logfire",
      "display": "import logfire\nlogfire.configure(send_to_logfire=False)\nwith logfire.span('example'):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Repository stars, logfire",
      "display": "4.6K",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "OpenTelemetry API integration, logfire",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "OTLP trace export, logfire",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Distribution split, logfire",
      "display": "logfire facade installs matching logfire-sdk; logfire-api is a separate proxy",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Project function, logfire",
      "display": "async def main():\n    async with AsyncClient() as client:\n        logfire.instrument_httpx(client, capture_all=True)\n        deps = Deps(client=client)\n        result = await weather_agent.run(\n            'What is the weather like in London and in Wiltshire?', deps=deps\n        )\n        print('Response:', result.output)",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Project source file, logfire",
      "display": "examples/pydantic_ai_examples/weather_agent.py",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project full_name, logfire",
      "display": "pydantic/pydantic-ai",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project stargazers_count, logfire",
      "display": "21.3K",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Library name, mlflow-tracing",
      "display": "MLflow Tracing",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Monthly downloads, mlflow-tracing",
      "display": "17.5M",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "License, mlflow-tracing",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Package release, mlflow-tracing",
      "display": "3.18.0",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Package release date, mlflow-tracing",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Install, mlflow-tracing",
      "display": "pip install mlflow-tracing opentelemetry-exporter-otlp",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Quickstart, mlflow-tracing",
      "display": "import os\nos.environ['OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'] = 'http://localhost:4318/v1/traces'\nos.environ['OTEL_EXPORTER_OTLP_TRACES_PROTOCOL'] = 'http/protobuf'\nimport mlflow\nwith mlflow.start_span(name='example'):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Official description, mlflow-tracing",
      "display": "Instruments code for MLflow tracing with a minimal set of dependencies.",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Quickstart source file, mlflow-tracing",
      "display": "genai/tracing/opentelemetry/export",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Repository stars, mlflow-tracing",
      "display": "28.9K",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "OpenTelemetry API integration, mlflow-tracing",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "OTLP trace export, mlflow-tracing",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Export destination, mlflow-tracing",
      "display": "MLflow default, optional OTLP or dual export",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project function, mlflow-tracing",
      "display": "def _instrument_runner_step(self, runner_step: Callable[..., Iteration]):\n    @wraps(runner_step)\n    def trace_step_wrapper(*args, **kwargs) -> Iteration:\n        with mlflow.start_span(\n            name=\"guardrails/guard/step\",\n            span_type=\"step\",\n            attributes={\n                \"guardrails.version\": GUARDRAILS_VERSION,\n                \"type\": \"guardrails/guard/step\",\n            },\n        ) as step_span:\n            try:\n                response = runner_step(*args, **kwargs)\n                add_step_attributes(step_span, response, *args, **kwargs)  # type: ignore\n                return response\n            except Exception as e:\n                step_span.set_status(status=SpanStatusCode.ERROR)\n                add_step_attributes(step_span, None, *args, **kwargs)  # type: ignore\n                raise e\n\n    return trace_step_wrapper",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Project source file, mlflow-tracing",
      "display": "guardrails/integrations/databricks/ml_flow_instrumentor.py",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Project full_name, mlflow-tracing",
      "display": "guardrails-ai/guardrails",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Project stargazers_count, mlflow-tracing",
      "display": "7.6K",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Library name, aws-xray-sdk",
      "display": "AWS X-Ray SDK",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Monthly downloads, aws-xray-sdk",
      "display": "17.1M",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "License, aws-xray-sdk",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Package release, aws-xray-sdk",
      "display": "2.16.0",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Package release date, aws-xray-sdk",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Install, aws-xray-sdk",
      "display": "pip install aws-xray-sdk",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Quickstart, aws-xray-sdk",
      "display": "from aws_xray_sdk.core import xray_recorder\nxray_recorder.configure(service='example')\nwith xray_recorder.in_segment('example'):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Official description, aws-xray-sdk",
      "display": "Records application data and sends it to AWS X-Ray.",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Quickstart source file, aws-xray-sdk",
      "display": "aws_xray_sdk/core/recorder.py",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Repository stars, aws-xray-sdk",
      "display": "340",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "OpenTelemetry API integration, aws-xray-sdk",
      "display": "Undocumented",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "OTLP trace export, aws-xray-sdk",
      "display": "Undocumented",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Lifecycle, aws-xray-sdk",
      "display": "Security-only maintenance since February25,2026; migrate to OpenTelemetry",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Trace backend, aws-xray-sdk",
      "display": "X-Ray daemon and AWS X-Ray service",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project function, aws-xray-sdk",
      "display": "@functools.wraps(lambda_handler)\ndef decorate(event, context, **kwargs):\n    with self.provider.in_subsegment(name=f\"## {lambda_handler_name}\") as subsegment:\n        try:\n            logger.debug(\"Calling lambda handler\")\n            response = lambda_handler(event, context, **kwargs)\n            logger.debug(\"Received lambda handler response successfully\")\n            self._add_response_as_metadata(\n                method_name=lambda_handler_name,\n                data=response,\n                subsegment=subsegment,\n                capture_response=capture_response,\n            )\n        except Exception as err:\n            logger.exception(f\"Exception received from {lambda_handler_name}\")\n            self._add_full_exception_as_metadata(\n                method_name=lambda_handler_name,\n                error=err,\n                subsegment=subsegment,\n                capture_error=capture_error,\n            )\n\n            raise\n        finally:\n            cold_start = _is_cold_start()\n            logger.debug(\"Annotating cold start\")\n            subsegment.put_annotation(key=\"ColdStart\", value=cold_start)\n\n            if self.service:\n                subsegment.put_annotation(key=\"Service\", value=self.service)\n\n        return response",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Project source file, aws-xray-sdk",
      "display": "aws_lambda_powertools/tracing/tracer.py",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Project full_name, aws-xray-sdk",
      "display": "aws-powertools/powertools-lambda-python",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Project stargazers_count, aws-xray-sdk",
      "display": "3.3K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python tracing libraries OpenTelemetry ddtrace Sentry Logfire distributed tracing code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
