OpenTelemetry is a single, vendor-agnostic instrumentation library per language with support for both automatic and manual instrumentation. It provides open-standard semantic conventions to ensure vendor-agnostic data collection.
Follow instrumentation using OpenTelemetry at https://opentelemetry.io/docs/concepts/instrumenting. Also, extend OpenTelemetry using various plugins, libraries and integrations avaiable at https://opentelemetry.io/registry/
*You can instrument using any open-standard library and SigNoz will be your best Observability backend to ingest, analyse and visualize data
As owners of applications we like to know where our application spends time whenever another application calls our service. We would like to know atleast below basic details about our API calls
- HTTP responses from web services
- HTTP requests from clients
- Database calls
As an example we would see how we can instrument a simple flask application which hosts an API endpoint
/ and whenever that endpoint is called it shall make an external call to
https://signoz.io and respond back to client. Below is the code:
- pip install flask
- pip install opentelemetry-instrumentation-flask
- pip install opentelemetry-instrumentation-requests
These packages will auto instrument the requests being handled by this flask application. We have used ConsoleSpanExporter which will print the spans to the console. We can also send those spans to other tracing backends like Jaeger or SigNoz.
Below are the 3 spans created by visiting