Skip to content

Migrate or shim BBE logger arguments to slog #1238

Open
@nadiamoe

Description

@nadiamoe

In https://redirect.github.com/prometheus/blackbox_exporter/pull/1311, BBE switched to slog, and that is blocking us from upgrading it:

Run make build-native
Building github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent (linux-amd64)
# github.com/grafana/synthetic-monitoring-agent/internal/prober/grpc
internal/prober/grpc/grpc.go:46:62: cannot use logger (variable of interface type logger.Logger) as *slog.Logger value in argument to bbeprober.ProbeGRPC
# github.com/grafana/synthetic-monitoring-agent/internal/prober/tcp
internal/prober/tcp/tcp.go:46:61: cannot use logger (variable of interface type logger.Logger) as *slog.Logger value in argument to bbeprober.ProbeTCP
# github.com/grafana/synthetic-monitoring-agent/internal/prober/http
internal/prober/http/http.go:65:62: cannot use logger (variable of interface type logger.Logger) as *slog.Logger value in argument to bbeprober.ProbeHTTP
make: *** [/__w/synthetic-monitoring-agent/synthetic-monitoring-agent/scripts/make/build.mk:21: build-go-linux-amd64-github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent] Error 1
Error: Process completed with exit code 2.

We should either move to slog, or somehow shim our existing logger into slog for BBE to accept it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions