Set opentelemetry_ecto span kind to CLIENT (#38)
From the [semantic conventions][1]: > Span kind: MUST always be CLIENT. [1]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md Co-authored-by: Bryan Naegele <bryannaegele@users.noreply.github.com>
This commit is contained in:
parent
3f43f8dd9f
commit
4aaf86181a
|
@ -97,7 +97,8 @@ defmodule OpentelemetryEcto do
|
||||||
s =
|
s =
|
||||||
OpenTelemetry.Tracer.start_span(span_name, %{
|
OpenTelemetry.Tracer.start_span(span_name, %{
|
||||||
start_time: start_time,
|
start_time: start_time,
|
||||||
attributes: attributes ++ base_attributes
|
attributes: attributes ++ base_attributes,
|
||||||
|
kind: :client
|
||||||
})
|
})
|
||||||
|
|
||||||
OpenTelemetry.Span.end_span(s)
|
OpenTelemetry.Span.end_span(s)
|
||||||
|
|
|
@ -39,7 +39,8 @@ defmodule OpentelemetryEctoTest do
|
||||||
assert_receive {:span,
|
assert_receive {:span,
|
||||||
span(
|
span(
|
||||||
name: "opentelemetry_ecto.test_repo.query:users",
|
name: "opentelemetry_ecto.test_repo.query:users",
|
||||||
attributes: list
|
attributes: list,
|
||||||
|
kind: :client
|
||||||
)}
|
)}
|
||||||
|
|
||||||
assert [
|
assert [
|
||||||
|
|
Loading…
Reference in New Issue