# Path: osprofiler/web.py
# _REQUIRED_KEYS = ("base_id", "hmac_key")
# _OPTIONAL_KEYS = ("parent_id",)
# X_TRACE_INFO = "X-Trace-Info"
# X_TRACE_HMAC = "X-Trace-HMAC"
# _ENABLED = None
# _HMAC_KEYS = None
#     _ENABLED = False
#     _ENABLED = True
#     _HMAC_KEYS = utils.split(hmac_keys or "")
# def get_trace_id_headers():
# def disable():
# def enable(hmac_keys=None):
#     def __init__(self, application, hmac_keys=None, enabled=False, **kwargs):
#     def factory(cls, global_conf, **local_conf):
#         def filter_(app):
#     def _trace_is_valid(self, trace_info):
#     def __call__(self, request):
# class WsgiMiddleware(object):


from oslo_config import cfg
from osprofiler import web

_hmac_keys_opt = cfg.StrOpt(
    "hmac_keys",
    default="SECRET_KEY",
    help="""
Secret key(s) to use for encrypting context data for performance profiling.

This string value should have the following format: <key1>[,<key2>,...<keyn>],
where each key is some random string. A user who triggers the profiling via
the REST API has to set one of these keys in the headers of the REST API call
to include profiling results of this node for this particular project.

Both "enabled" flag and "hmac_keys" config options should be set to enable
profiling. Also, to generate correct profiling information across all services
at least one key needs to be consistent between OpenStack projects. This
ensures it can be used from client side to generate the trace, containing
information from all possible resources.
""")

_connection_string_opt = cfg.StrOpt(
    "connection_string",
    default="messaging://",
    help="""
Connection string for a notifier backend.

Default value is ``messaging://`` which sets the notifier to oslo_messaging.

Examples of possible values:

* ``messaging://`` - use oslo_messaging driver for sending spans.

# Path: osprofiler/web.py
# _REQUIRED_KEYS = ("base_id", "hmac_key")
# _OPTIONAL_KEYS = ("parent_id",)
# X_TRACE_INFO = "X-Trace-Info"
# X_TRACE_HMAC = "X-Trace-HMAC"
# _ENABLED = None
# _HMAC_KEYS = None
#     _ENABLED = False
#     _ENABLED = True
#     _HMAC_KEYS = utils.split(hmac_keys or "")
# def get_trace_id_headers():
# def disable():
# def enable(hmac_keys=None):
#     def __init__(self, application, hmac_keys=None, enabled=False, **kwargs):
#     def factory(cls, global_conf, **local_conf):
#         def filter_(app):
#     def _trace_is_valid(self, trace_info):
#     def __call__(self, request):
# class WsgiMiddleware(object):


# Path: osprofiler/opts.py
from oslo_config import cfg
from osprofiler import web


_hmac_keys_opt = cfg.StrOpt(
    "hmac_keys",
    default="SECRET_KEY",
    help="""
Secret key(s) to use for encrypting context data for performance profiling.

This string value should have the following format: <key1>[,<key2>,...<keyn>],
where each key is some random string. A user who triggers the profiling via
the REST API has to set one of these keys in the headers of the REST API call
to include profiling results of this node for this particular project.

Both "enabled" flag and "hmac_keys" config options should be set to enable
profiling. Also, to generate correct profiling information across all services
at least one key needs to be consistent between OpenStack projects. This
ensures it can be used from client side to generate the trace, containing
information from all possible resources.
""")

_connection_string_opt = cfg.StrOpt(
    "connection_string",
    default="messaging://",
    help="""
Connection string for a notifier backend.

Default value is ``messaging://`` which sets the notifier to oslo_messaging.

Examples of possible values:

* ``messaging://`` - use oslo_messaging driver for sending spans.

* ``redis://127.0.0.1:6379`` - use redis driver for sending spans.