oolong-dev / OpenTelemetry.jl

An unofficial implementation of OpenTelemetry in Julia.
https://oolong.dev/OpenTelemetry.jl/
Apache License 2.0
30 stars 9 forks source link

Error when using Otel Exporter #116

Closed ppalmes closed 1 month ago

ppalmes commented 1 month ago
using OpenTelemetry

global_meter_provider(MeterProvider());

m = Meter("demo_metrics");
c = Counter{UInt}("fruit_counter", m)
c(2; name = "apple", color = "green")

r = MetricReader(OtlpHttpMetricsExporter())

=======
ERROR: MethodError: no method matching export!(::OpenTelemetryExporterOtlpProtoHttp.OtlpHttpExporter{…}, ::Base.IdSet{…})
Closest candidates are:
  export!(::ConsoleExporter, ::Any)
   @ OpenTelemetrySDK ~/.julia/packages/OpenTelemetrySDK/xNwnQ/src/exporter.jl:73
  export!(::InMemoryExporter, ::Any)
   @ OpenTelemetrySDK ~/.julia/packages/OpenTelemetrySDK/xNwnQ/src/exporter.jl:53
  export!(::DummyExporter, ::Any)
   @ OpenTelemetrySDK ~/.julia/packages/OpenTelemetrySDK/xNwnQ/src/exporter.jl:27
findmyway commented 1 month ago

Thanks for reporting!

Seems like this exporter hasn't been tested for a long time, I'll fix it soon.