Skip to content

[mdatagen] templates not rendering correctly when running against v0.120.0 of mdatagen #12455

Closed
@adrielp

Description

@adrielp

Component(s)

cmd/mdatagen

What happened?

Describe the bug

When updating mgdatagen to v0.120.0 in downstream Otel collector distributions with custom components, mdatagen generates metrics missing import statements for components with resource attributes.

filter package has been removed but is still required when emitting metrics with resource attributes. This appears to be a regression within this commit

Image

Steps to reproduce

Create a metrics receiver that defines resource attributes and run generate.

What did you expect to see?

  • Expected to see working generated components

What did you see instead?

  • Non-working generated components

Collector version

v0.120.0

Environment information

Environment

OS: Darwin arm64
Compiler(if manually compiled): go 1.23*

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions