diff options
author | Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> | 2023-03-14 12:22:47 +0100 |
---|---|---|
committer | Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com> | 2023-05-10 10:18:48 +0200 |
commit | 908e7402320eb067db45aa9700d54d31c259f3ca (patch) | |
tree | 75631a7f7c79d7f546ebf25b1e12fbf8c86e170d /devstack | |
parent | 4f3eaa411c6ad731e831bafcb664a4649a1a75a5 (diff) | |
download | osprofiler-master.tar.gz |
Depends-On: Idcff5d79b4884dd1cc7ed1ab42c9e4ce89d4a6d2
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Change-Id: I74cdcb2aa99b0162ba1c14059111f09d0bb534e3
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/lib/osprofiler | 17 | ||||
-rw-r--r-- | devstack/plugin.sh | 3 |
2 files changed, 17 insertions, 3 deletions
diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler index 6dc7e0e..d5b4755 100644 --- a/devstack/lib/osprofiler +++ b/devstack/lib/osprofiler @@ -58,19 +58,29 @@ function install_redis() { pip_install_gr redis } -function install_jaeger() { +function install_jaeger_backend() { if is_ubuntu; then install_package docker.io start_service docker add_user_to_group $STACK_USER docker - sg docker -c "docker run -d --name jaeger -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:1.7" + sg docker -c "docker run -d --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 6831:6831/udp -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one:1.42" else exit_distro_not_supported "docker.io installation" fi +} +function install_jaeger() { + install_jaeger_backend pip_install jaeger-client } +function install_otlp() { + # For OTLP we use Jaeger backend but any OTLP compatible backend + # can be used. + install_jaeger_backend + pip_install opentelemetry-sdk opentelemetry-exporter-otlp +} + function drop_jaeger() { sg docker -c 'docker rm jaeger --force' } @@ -112,6 +122,9 @@ function install_osprofiler_collector() { elif [ "$OSPROFILER_COLLECTOR" == "jaeger" ]; then install_jaeger OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"jaeger://localhost:6831"} + elif [ "$OSPROFILER_COLLECTOR" == "otlp" ]; then + install_otlp + OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"otlp://localhost:4318"} elif [ "$OSPROFILER_COLLECTOR" == "elasticsearch" ]; then install_elasticsearch OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"elasticsearch://elastic:changeme@localhost:9200"} diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 705d6ce..49cd670 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -20,7 +20,8 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then configure_osprofiler_in_tempest elif [[ "$1" == "unstack" ]]; then - if [[ "$OSPROFILER_COLLECTOR" == "jaeger" ]]; then + if [[ "$OSPROFILER_COLLECTOR" == "jaeger" || \ + "$OSPROFILER_COLLECTOR" == "otlp" ]]; then echo_summary "Deleting jaeger docker container" drop_jaeger fi |