Skip to content

core: add trace API

Nicolas LeQuec requested to merge trace-display into master

Add a new API to collect traces from demuxer, decoder...

Instead of the previous log system, traces are stored under a JSON format, it is useful to analyze them later.

Traces are structured as follows:

{
  "Attributes": {
    "tid": 235583,
    "file": "input/es_out.c",
    "file.func": "EsOutSend",
    "file.line": 1445304328
  },
  "Ressources": {
    "module": "main",
    "object.type": "input",
    "object.id": "7f2a8d3ad400"
  },
  "SeverityText": "tracer",
  "Timestamp": 22561187465000,
  "Body": {
    "type": "DEMUX",
    "id": "audio/2",
    "stream": "OUT",
    "pts": 59489524000,
    "dts": 59489524000
  }
}

It's inspired from: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md

Json logs may then be processed by a script to be displayed on a graph, here is the project link: https://gitlab.com/videolabs/public/vlc-pa

And here a render of what can be obtained: traces_display

Edited by Nicolas LeQuec

Merge request reports