Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import builtins
import os
import sys
from os import listdir
from os.path import isdir, join

import opentelemetry.util.types

# opentelemetry-api >= 1.45 defines AttributeValue = AnyValue = ... | Sequence["AnyValue"] | Mapping[str, "AnyValue"].
# When sphinx-autodoc-typehints evaluates type annotations in modules that import AttributeValue,
# it looks up "AnyValue" in the module globals or builtins. Injecting AnyValue into builtins allows
# forward reference evaluation to resolve cleanly across all documented modules.
builtins.AnyValue = getattr(opentelemetry.util.types, "AnyValue", None)

source_dirs = []

instr = "../instrumentation"
Expand Down
Loading