I can look and try refactoring it later. _Originally posted by @pellared in https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6527#discussion_r1922411829_