I am trying to implement OpenTelemetry in my Phoenix app and am following this Getting Started Guide
I followed all the steps mentioned, and when I try to log spans in the console (as shown here: Try it out), I only see Ecto-related attributes in the span. However, I do not see any HTTP attributes (such as method, URL, or status code).
Here’s an example of the span I’m getting:
{span,199985616168702119339811124307741799904,15622809613813534696,
{tracestate,[]},
undefined,<<"kayaan_prints.repo.query:users">>,client,-5764607449421824,
-5764607449372672,
{attributes,128,infinity,0,
#{source => <<"users">>,
'db.instance' => <<"kayaan_prints_dev">>,
'db.name' => <<"kayaan_prints_dev">>, 'db.type' => sql,
'db.url' => <<"ecto://localhost">>,
'db.system' => postgresql, total_time_microseconds => 4812,
decode_time_microseconds => 0,
idle_time_microseconds => 980275,
query_time_microseconds => 2048,
queue_time_microseconds => 2764}},
{events,128,128,infinity,0,[]},
{links,128,128,infinity,0,[]},
undefined,1,false,
{instrumentation_scope,<<"opentelemetry_ecto">>,<<"1.2.0">>,undefined}}
It seems like opentelemetry_ecto
is working fine, but I am not getting any HTTP-related telemetry data.
Does anyone know what could be causing this? Do I need to add an additional instrumentation library for HTTP spans in Phoenix? Any help would be appreciated!