opsb

opsb

Open telemetry: how to include an array of primitive values in attributes

We’ve just started using OpenTelemetry — OpenTelemetry API v1.0.0-rc.3.2 to integrate our APM with Datadog. According to the Open Telemetry specification

  • The attribute value, which is either:
    • A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
    • An array of primitive type values. The array MUST be homogeneous, i.e. it MUST NOT contain values of different types. For protocols that do not natively support array values such values SHOULD be represented as JSON strings. There’s also Span attributes: array of primitives · Issue #111 · open-telemetry/opentelemetry-erlang · GitHub which seems to imply that opentelemetry-erlang supports arrays of primitives in span attributes. However when I try to add span attributes with an array
OpenTelemetry.Span.start_span(span_ctx, [{"key1", ["one", "two"]}])

in the otel collector logs I see that attribute come through as EMPTY. Is it currently possible to use arrays or is there still some work to do?

@tristan I saw you mention that you were scanning for Open Telemetry questions so I hope you don’t mind me tagging you here.

First Post!

tristan

tristan

Rebar3 Core Team

Hey, yea, @'ing me is fine :). Have you checked to make sure it isn’t being dropped on accident by the Erlang/Elixir code? Like by using the stdout trace exporter? If its there then it could be the protobuf conversion (we may even need to update the protobufs used in the exporter). I’ll have to look later, just wanted to throw some stuff out there in case you had time to investigate more before I do later today.

Last Post!

tristan

tristan

Rebar3 Core Team

Since it is in a subdirectory you need to include the sparse option:

{:opentelemetry_exporter, github: “open-telemetry/opentelemetry-erlang”, sparse: “apps/opentelemetry_exporter”, override: true},

https://github.com/open-telemetry/opentelemetry-erlang#git-dependencies

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130286 1222
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement