View Source Traces
RTC Engine uses membrane_opentelemetry to generate OpenTelemetry traces and spans.
You can enable traces in your config.exs:
config :membrane_opentelemetry, enabled: trueBesides this you need to put :opentelemetry config in config/runtime.exs, for example
config :opentelemetry, :resource,
service: [
name: "membrane_rtc_engine",
namespace: "membrane"
],
processors: [
otel_batch_processor: %{
exporter: {:otel_exporter_stdout, []}
}
]Where:
service- name and namespace of the service. They are used for easier distinction from other services. You can read more hereprocessors- defines when spans should be exported.otel_simple_procesorflushes each span immediately after ending it whileotel_batch_processorbuffers several spans and flushes them in a batch. For more see otel_simple_processor or otel_batch_processorexporter- defines where spans should be exported. otel_exporter_stdout prints spans to stdout but there are other exporters that can visualize traces in a human readable format like Zipkin
To see more about :opentelemetry config, you can go to the OpenTelemetry documentation
You can also go to membrane_videoroom for more examples.