Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TLDR: Tracing has been added for A1 Policy Management Service. By default tracing is disabled. To enable it change there are two ways:

A) System Property

Change the flag otel.sdk.disabled to false in the application.yaml (New Delhi) 

Code Block
languageyml
themeMidnight
otel:
  sdk:     
    disabled: ${ONAP_SDK_DISABLED:false}
    south: ${ONAP_TRACING_SOUTHBOUND:true}   
  instrumentation:
    spring-webflux:
      enabled: ${OTEL_INSTRUMENTATION_SPRING_WEBFLUX_ENABLED:true}true
  1. otel.sdk.disabled: enable/disable tracing all toghether
  2. otel.sdk.south: if ONAP_SDK_DISABLED is false then we can enable/disable southbound tracing
  3. otel.instrumentation.spring-webflux.enabled: if ONAP_SDK_DISABLED is false we can enable/disable northbound tracing

B) Enviroment Variable

Have the environment variablesOR have the environment variables (example in the docker-compose.yaml below), this way you don't need to change the application.yaml and rebuild the docker image

...

  1. ONAP_SDK_DISABLED: enable/disable tracing all toghether
  2. ONAP_TRACING_SOUTHBOUND: if ONAP_SDK_DISABLED is false then we can enable/disable southbound tracing
  3. OTEL_INSTRUMENTATION_SPRING_WEBFLUX_ENABLED: if ONAP_SDK_DISABLED is false we can enable/disable northbound tracing


Possible Combinations 

So we can have the following combinations:

...

View file
nameapplication_configuration.json.nosdnc
height250
View file
namedocker-compose.yaml
height250

View file
nametracing_demo.mp4
height250



a) A docker compose with a1pms, a1-osc-simulator, and jaeger that acts as a collector and exporter. Note: onap/ccsdk-oran-a1policymanagementservice:1.7.0-SNAPSHOT is built locally by doing "mvn clean install", you can use the nexus hosted image changing the prefix.

...

e) http://localhost:16686/ Load Jaeger UI, a1-pms traces, and a sample of the last call would be:
Image Removed
Image Added


Steps Taken and Challenges:

...

OTEL_INSTRUMENTATION_SPRING_WEBFLUX_ENABLED=true from the documentation we can use this flag to disable the automatic spring instrumentation and we keep a separate manual flag ONAP_TRACING_SOUTHBOUND for the AsyncRestClient requests made to the southbound.

System property
: otel.instrumentation.[name].enabled
Environment variable: OTEL_INSTRUMENTATION_[NAME]_ENABLED
Note: When using OPENTELEMETRY (Evrything starting with otel) environment variables, dashes (-) should be converted to underscores (_). For example, to suppress traces from spring-webflux library, set OTEL_INSTRUMENTATION_SPRING_WEBFLUX_ENABLED to false


Full Tracing:
Image Added

Only Southbound Tracing Output:
Image Added

Only Northbound Tracing Output:

Image Added