#Is the Dagger engine injecting `OTEL_
1 messages · Page 1 of 1 (latest)
It looks like it is, which is rather frustrating as it's trigger OTel exporters for opentofu and terraform which means my log out put is littered with failed connections
I confirmed with dag.container().from("bash").withExec(["printenv"]);
Hmm, perhaps it's BuildKit that's injecting these
cc @atomic idol @halcyon gull
Yep, it's buildkit adding this, though we can remove it if we want. We're actually in the midst of switching everything over to otel and saw this as a positive, since people would be able to see fine grained info for things they're calling, so it's funny that the first time anyone's noticed it is now, and they don't want it 😛
It should also be setting a valid OTEL_ env var that configures the OTLP endpoint though, not just that var
So I'm curious what the failed connections are
Sadly many tools that we're wrapping in Dagger/BuildKit also use this prefix and we're not accidentally configuring OTel for them all
only, it doesn't work because /dev/otel-grpc.sock doesn't actually exist
I don't think Dagger and BuildKit should be leaking these environment variables to my builds
dagger call -m terraform-cdk diff --source-dir . stdout
[2024-03-05T13:41:13.386] [ERROR] default - 2024/03/05 13:41:13 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: des
c = "transport: Error while dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
[2024-03-05T13:41:13.533] [ERROR] default - 2024/03/05 13:41:13 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: des
c = "transport: Error while dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
[2024-03-05T13:41:13.910] [ERROR] default - 2024/03/05 13:41:13 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: des
c = "transport: Error while dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
[2024-03-05T13:41:14.099] [ERROR] default - 2024/03/05 13:41:14 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: des
c = "transport: Error while dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
kubernetes-platform Initializing the backend...
kubernetes-platform
Successfully configured the backend "local"! OpenTofu will automatically
use this backend unless the backend configuration changes.
kubernetes-platform 2024/03/05 13:41:25 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error w
hile dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
kubernetes-platform Initializing provider plugins...
kubernetes-platform 2024/03/05 13:41:35 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error w
hile dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
OpenTofu has been successfully initialized!
You may now begin working with OpenTofu. Try running "tofu plan" to see
any changes that are required for your infrastructure. All OpenTofu commands
should now work.
If you ever set or change modules or backend configuration for OpenTofu,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
kubernetes-platform 2024/03/05 13:41:45 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error w
hile dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
kubernetes-platform Success! OpenTofu has validated the lock file and found no need for changes.
â ¦ Processing
[2024-03-05T13:41:55.758] [ERROR] default - 2024/03/05 13:41:55 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: des
kubernetes-platform 2024/03/05 13:41:55 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error w
hile dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
kubernetes-platform No changes. Your infrastructure matches the configuration.
OpenTofu has compared your real infrastructure against your configuration and
found no differences, so no changes are needed.
â § Processing
[2024-03-05T13:42:05.808] [ERROR] default - 2024/03/05 13:42:05 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: deskubernetes-platform 2024/03/05 13:42:05 traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error w
hile dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"
It's a lot of noise
I also imagine some folks may wish to run integration tests in Dagger and that may involve performance tests with OTel; and when we use withEnvVariable our values for OTEL are destroyed by BuildKit
maybe pointless clarification: it should exist but it looks like the tooling isn't able to handle a unix socket (guessing a lot of things only ever care about TCP in 'prod' so they only code against that)
yeah totally fair, we at least shouldn't clobber user-set values
Maybe it's still useful, but just should be made an opt-in, configurable in Container.withExec?
yeah makes sense. One line of thinking is "there are standard env vars for all of this, so we should just set them appropriately and everything will magically work, with users opting in transparently through use" - except in practice that doesn't always pan out. It is kind of nice to avoid the extra knob, but maybe that's the safer trade-off. Either way we shouldn't be overriding user-supplied env vars there since that gives the user no choice
Could also be an opt-out 😀