Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OTEL_LOG_LEVEL=info to avoid large amounts of logs in odiglet #1328

Merged
merged 2 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cli/cmd/resources/odiglet.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ func NewOdigletDaemonSet(ns string, version string, imagePrefix string, imageNam
},
},
},
{
Name: "OTEL_LOG_LEVEL",
Value: "info",
},
}, dynamicEnv...),
EnvFrom: []corev1.EnvFromSource{
{
Expand Down
2 changes: 2 additions & 0 deletions odiglet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Assuming a setup with an active kind cluster with Odigos installed:
In addition, it will port-forward the debugger port for remote debug.
2. Using vscode launch the `Remote Odiglet` configuration.
3. Debug the code.

Odiglet defaults to use the environment variable `OTEL_LOG_LEVEL` with value of `info`. When debugging or developing it is useful to increase the log level to `debug` for instrumentations. Note that this value only controls the log level for the instrumentations Odiglet invokes directly (eBPF) and does not apply for the k8s controllers or 3rd party agents.
2 changes: 1 addition & 1 deletion odiglet/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/odigos-io/odigos/opampserver v0.0.0
github.com/odigos-io/odigos/procdiscovery v0.0.0
github.com/odigos-io/opentelemetry-zap-bridge v0.0.5
go.opentelemetry.io/auto v0.13.0-alpha.0.20240615124104-22d9af3d1a11
go.opentelemetry.io/auto v0.13.0-alpha.0.20240705154812-28b663b26905
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0
go.uber.org/zap v1.27.0
Expand Down
4 changes: 2 additions & 2 deletions odiglet/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/auto v0.13.0-alpha.0.20240615124104-22d9af3d1a11 h1:H2w8qlDoZELdWskPATWM/yKQ3aLSokS2PxhoDP6DcPw=
go.opentelemetry.io/auto v0.13.0-alpha.0.20240615124104-22d9af3d1a11/go.mod h1:7lDId8pdd0bm8odWRLh8xdA01d7oRtLMxwLCZAuibtc=
go.opentelemetry.io/auto v0.13.0-alpha.0.20240705154812-28b663b26905 h1:jkn+mjs7Cpfzj/bjs8M9Ums2bxoABgq9ZtFI4aeL9M4=
go.opentelemetry.io/auto v0.13.0-alpha.0.20240705154812-28b663b26905/go.mod h1:7lDId8pdd0bm8odWRLh8xdA01d7oRtLMxwLCZAuibtc=
go.opentelemetry.io/collector/pdata v1.7.0 h1:/WNsBbE6KM3TTPUb9v/5B7IDqnDkgf8GyFhVJJqu7II=
go.opentelemetry.io/collector/pdata v1.7.0/go.mod h1:ehCBBA5GoFrMZkwyZAKGY/lAVSgZf6rzUt3p9mddmPU=
go.opentelemetry.io/contrib/bridges/prometheus v0.52.0 h1:NNkEjNcUXeNcxDTNLyyAmFHefByhj8YU1AojgcPqbfs=
Expand Down
1 change: 1 addition & 0 deletions odiglet/pkg/ebpf/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (g *GoInstrumentationFactory) CreateEbpfInstrumentation(ctx context.Context

inst, err := auto.NewInstrumentation(
ctx,
auto.WithEnv(), // for OTEL_LOG_LEVEL
auto.WithPID(pid),
auto.WithResourceAttributes(utils.GetResourceAttributes(podWorkload, podName)...),
auto.WithServiceName(serviceName),
Expand Down
Loading