You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a new metric is added into metadata.yaml file and make generate is ran, I can see multiple files generated by mdatagen. But one of the files internal/metadataset/generated_telemetrytest_test.go is missing an import:
The workaround is to run goimports after the make generate command. But it would be nice to have mdatagen to take care of the imports directly.
What did you expect to see?
I expect to see "github.com/elastic/opentelemetry-collector-components/processor/ratelimitprocessor/internal/metadata" in the import list.
What did you see instead?
Missing import instead.
Collector version
v0.125.0
Environment information
Environment
OS: macOS 15.4.1
Compiler(if manually compiled): go 1.23.8
The text was updated successfully, but these errors were encountered:
@kaiyan-sheng To resolve this issue quickly, you can run make gogenerate, which will correctly add the missing imports.
Since this is a Go template-based module, it's quite challenging to conditionally track all the imports. We've encountered similar issues frequently. However, feel free to open a PR to address this problem!
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
cmd/mdatagen
What happened?
Describe the bug

When a new metric is added into metadata.yaml file and
make generate
is ran, I can see multiple files generated bymdatagen
. But one of the filesinternal/metadataset/generated_telemetrytest_test.go
is missing an import:Steps to reproduce
metadata.yaml
make generate
The workaround is to run
goimports
after themake generate
command. But it would be nice to havemdatagen
to take care of the imports directly.What did you expect to see?
I expect to see
"github.com/elastic/opentelemetry-collector-components/processor/ratelimitprocessor/internal/metadata"
in the import list.What did you see instead?
Missing import instead.
Collector version
v0.125.0
Environment information
Environment
OS: macOS 15.4.1
Compiler(if manually compiled): go 1.23.8
The text was updated successfully, but these errors were encountered: