#otel traces, metric, log from pipeline to external backend?
1 messages ยท Page 1 of 1 (latest)
yes, you have all the officially supported OTEL variables here: https://github.com/dagger/dagger/blob/729c602eae0a8082edc1e19d006925cec4c7bdaa/engine/buildkit/executor_spec.go#L63-L71
you need to set those in the engine
Hey @exotic plank ๐
i have enabled otel with these vars (we are using remote dagger engine not using cloud version)
and these env set at host machine where dagger client is installed
OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL
i can see span and traces are getting generated in honeycomb
but I cannot see logs and metrics in loki and mimir
Am i missing something here, could you please help?
may be thats because of this
https://github.com/dagger/dagger/blob/bfc6db4c0f31718b54f02bfcf55f201b6a4ad8df/sdk/go/telemetry/init.go#L119
and based on this https://github.com/dagger/dagger/blob/bfc6db4c0f31718b54f02bfcf55f201b6a4ad8df/sdk/go/telemetry/init.go#L251
i think metric is not supported
correct me if I am wrong here?
๐
Metrics and logs OTEL APIs are not implemented yet, only traces
I remember supporting metrics being mentioned somewhere, not sure about logging
cc @ocean wedge
logs are supported, metrics are not, but logs have to be explicitly enabled with a separate env var (OTEL_EXPORTER_OTLP_LOGS_ENDPOINT)
Logs are now shipping to otel collector, but the console logs that I usually see from app to server stdout console, is not coming to otel. Seems engine logs coming without any app debug/info that i have used. Any idea how can we send those console logs to otel collector via dagger. i assume now it runs dagger session internally from sdk after it got upgrade, which i am not sure if taking care of application logs(non-dagger)
let me know
@ocean wedge any idea on this issue ๐ ?
@young tangle not sure I'm following 100%, but make sure you're configuring OTEL_* vars on the client side (where you're running the dagger CLI), not on the engine side
i can see logs, but those logs are either dagger engine errors or span traces logs but I cannot see any other logs generated by application(they are non dagger code), i thought running whole app like dagger run go run main.go can send console logs as telemetry too
I don't have much context on what logs will it shipped, just trying my luck
FYI..I am able to fix that issue ๐
nice - what was it?
my application actually generating logs and putting in files but not stdout in console. And i observed that only stdout logs can be captured as part of dagger otel logs which is taken care by dagger cli automatically
Earlier i was only able to see dagger specific logs and now i can see all application logs
Important Note - this is working well in my local(TTY is present) but not in gitlab console ๐ฆ
but now i am blocked on this issue https://discord.com/channels/707636530424053791/1263141263524237363
basically this is working fine on my local mac machine. but it does not work in gitlab console bcz apparantly TTY is not suppored there(my best guess)
so few approaches i tried which did not work for me either
- I tried to use --progress=plain, but seeing huge logs on gitlab conole is not good for our customer ui experience
- I tried to use --silent feature, but also stopped application logs being shipped to grafana loki
so i am again kinda stuck ๐ฆ
@ocean wedge i would appreciate if you can guide me here ๐
--progress=plain is the solution there, but i think it's currently more verbose than intended. I'd just set that for now and wait for us to fix the bug
so tty mode is only recommened for local development as of now?
also by any chance if you know is there a good way to add tty capability in gitlab console using any external utility tool?
what i really would like to have here is, even with --silent mode there could be two path
- --soft_silent that disable ui logs in console but still send all telemtry data including all console.logs
- --hard_silent that disable ui logs and telemtry data too