Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ def hello():

.. code-block:: python

from opentelemetry.trace import Span
from wsgiref.types import WSGIEnvironment
from typing import List

from opentelemetry.instrumentation.flask import FlaskInstrumentor

def request_hook(span: Span, environ: WSGIEnvironment):
if span and span.is_recording():
span.set_attribute("custom_user_attribute_from_request_hook", "some-value")
Expand Down