summaryrefslogtreecommitdiff
path: root/osprofiler/opts.py
diff options
context:
space:
mode:
authorSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-03-14 12:22:47 +0100
committerSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-05-10 10:18:48 +0200
commit908e7402320eb067db45aa9700d54d31c259f3ca (patch)
tree75631a7f7c79d7f546ebf25b1e12fbf8c86e170d /osprofiler/opts.py
parent4f3eaa411c6ad731e831bafcb664a4649a1a75a5 (diff)
downloadosprofiler-908e7402320eb067db45aa9700d54d31c259f3ca.tar.gz
add support of otlp exporterHEADmaster
Depends-On: Idcff5d79b4884dd1cc7ed1ab42c9e4ce89d4a6d2 Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> Change-Id: I74cdcb2aa99b0162ba1c14059111f09d0bb534e3
Diffstat (limited to 'osprofiler/opts.py')
-rw-r--r--osprofiler/opts.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/osprofiler/opts.py b/osprofiler/opts.py
index af8d4c4..b12e2b5 100644
--- a/osprofiler/opts.py
+++ b/osprofiler/opts.py
@@ -195,6 +195,22 @@ _JAEGER_OPTS = [
cfg.CONF.register_opts(_JAEGER_OPTS, group=_jaegerprofiler_opt_group)
+_otlp_profiler_opt_group = cfg.OptGroup(
+ "profiler_otlp",
+ title="OTLP's profiler driver related options")
+
+_otlp_service_name_prefix = cfg.StrOpt(
+ "service_name_prefix",
+ help="""
+Set service name prefix to OTLP exporters.
+""")
+
+_OTLP_OPTS = [
+ _otlp_service_name_prefix,
+]
+
+cfg.CONF.register_opts(_OTLP_OPTS, group=_otlp_profiler_opt_group)
+
def set_defaults(conf, enabled=None, trace_sqlalchemy=None, hmac_keys=None,
connection_string=None, es_doc_type=None,
@@ -265,4 +281,5 @@ def disable_web_trace(conf=None):
def list_opts():
return [(_profiler_opt_group.name, _PROFILER_OPTS),
- (_jaegerprofiler_opt_group, _JAEGER_OPTS)]
+ (_jaegerprofiler_opt_group, _JAEGER_OPTS),
+ (_otlp_profiler_opt_group, _OTLP_OPTS)]