feat: Add OTel SDK setup#46
Conversation
272e086 to
175df48
Compare
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #46 +/- ##
========================================
Coverage 76.91% 76.91%
========================================
Files 200 200
Lines 20473 20473
========================================
Hits 15747 15747
Misses 4726 4726
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
m-misiura
left a comment
There was a problem hiding this comment.
Before merging, it would be useful to consider the following:
- currently it is possible to get traces via auto-instrumentation, e.g. see here, what is the advantage of this approach instead of using opentelemetry-instrument auto-instrumentation?
- there seems to be regression as there is no input validation inside
entrypoint.py
175df48 to
fe01c49
Compare
|
@m-misiura thanks for the feedback !
|
fe01c49 to
d813109
Compare
There was a problem hiding this comment.
Should our main entrypoint be in the otel/ dir? This seems a little confusing for a non-otel usecase where you'd still use otel/entrypoint
There was a problem hiding this comment.
done - moved the file toscripts/observability/
| COPY examples/bots/ ./examples/bots/ | ||
|
|
||
| RUN chmod +x ./scripts/entrypoint.sh | ||
| RUN chmod +x ./scripts/otel/entrypoint.py |
There was a problem hiding this comment.
See comment re. moving our entrypoint to the otel/ dir
d65ea80 to
afb9c26
Compare
| ) | ||
| parser.add_argument( | ||
| "--host", | ||
| default=os.environ.get("HOST", "0.0.0.0"), |
afb9c26 to
52f00f8
Compare
52f00f8 to
84231d5
Compare
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. | |||
Description
Supports OpenTelemetry SDK configuration to capture traces, metrics, and logs from the NeMo Guardrails server. Makes the following changes:
scripts/otel/entrypoint.py- checks that the OTel SDK is enabled before starting the NeMo serverscripts/otel/otel.py- handles configuration of the OTel SDKUsage
Ensure that the OTel collector and TempoStack query frontend services are running
Enable tracing and metrics on the config.yml:
Start the server via
scripts/otel/otel.py:Send a request to the NeMo server:
To view metrics, open a new browser window and go to
localhost:9000/metricsor $NEMO_URL/metrics:To view traces, open a new browser window and go to

http://localhost:16686: