-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
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 by mdatagen. But one of the files internal/metadataset/generated_telemetrytest_test.go is missing an import:

Steps to reproduce
- add a metric in
metadata.yaml - run
make generate - you can check Use mdatagen to add a telemetry metric kaiyan-sheng/opentelemetry-collector-components#1 as an example for the missing 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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers