Skip to content

OPENTELEMETRY module

The opentelemetry module provides OpenTelemetry tracing for OpenSIPS route execution. It creates a root span per processed SIP message and a child span for each route entry.

The root SIP message span follows a local semantic convention inspired by the OpenTelemetry HTTP span conventions: it uses a method-plus-target span name, server/client/internal span kinds based on the OpenSIPS route type, and generic network, client, server and URL attributes wherever they fit the SIP model.

Spans include common SIP attributes (request method, Call-ID, CSeq, response status) and connection metadata. While a span is active, OpenSIPS logs can be attached as OpenTelemetry events for easier correlation.

Trace data is exported via the OTLP/HTTP exporter from the OpenTelemetry C++ SDK.

The local SIP span convention emitted by this module is documented in modules/opentelemetry/semantic-convention/sip-spans.md.

The following modules must be loaded before this module:

  • None.

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • OpenTelemetry C++ SDK (opentelemetry-cpp), with the OTLP/HTTP exporter enabled.

Enables or disables OpenTelemetry tracing at startup. It can also be changed at runtime using the opentelemetry:enable MI command.

The module is built only when the OpenTelemetry C++ SDK is available at build time.

Default value is “0 (disabled)“.

Set enable parameter
...
modparam("opentelemetry", "enable", 1)
...

If enabled, the module will also profile/trace the OpenSIPS processes, not only the script.

Default value is “0 (disabled)“.

Set proc_profiling parameter
...
modparam("opentelemetry", "proc_profiling", 1)
...

Log level threshold used by the OpenTelemetry log consumer when attaching log events to the active span.

Default value is “L_DBG”.

Set log_level parameter
...
modparam("opentelemetry", "log_level", 3)
...

Selects the OpenTelemetry span processor. When enabled, the module uses the batch span processor; otherwise it uses the simple span processor.

Default value is “1 (enabled)“.

Set use_batch parameter
...
modparam("opentelemetry", "use_batch", 0)
...

Sets the OpenTelemetry “service.name” resource attribute.

Default value is “opensips”.

Set service_name parameter
...
modparam("opentelemetry", "service_name", "edge-proxy")
...

Overrides the OTLP/HTTP exporter endpoint. If empty, the OpenTelemetry SDK default is used.

Default value is “empty”.

Set exporter_endpoint parameter
...
modparam("opentelemetry", "exporter_endpoint", "http://127.0.0.1:4318/v1/traces")
...

Replaces obsolete MI command: otel_enable.

Enables or disables OpenTelemetry tracing at runtime.

Name: opentelemetry:enable

Parameters:

  • opentelemetry:enable - set to “1” to enable tracing or “0” to disable it.

MI FIFO Command Format:

Terminal window
## enable tracing
opensips-cli -x mi opentelemetry:enable enable=1
## disable tracing
opensips-cli -x mi opentelemetry:enable enable=0

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Vlad Paiu (@vladpaiu)2181155155
2.Razvan Crainea (@razvancrainea)972818
3.Stefan Darius9524034
4.Bogdan-Andrei Iancu (@bogdan-iancu)527366
5.Your Name312300

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits

(3) ignoring whitespace edits, renamed files and auto-generated files

#NameCommit Activity
1.Stefan DariusJun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Mar 2026 - Jun 2026
3.Bogdan-Andrei Iancu (@bogdan-iancu)Mar 2026 - Apr 2026
4.Vlad Paiu (@vladpaiu)Dec 2025 - Apr 2026
5.Your NameJan 2026 - Jan 2026

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Vlad Paiu (@vladpaiu), Your Name.

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0