Skip to content

[cmd/telemetrygen] Add support for different exporters in telemetrygen API #37175

@Erog38

Description

@Erog38

Component(s)

cmd/telemetrygen

Is your feature request related to a problem? Please describe.

In order to run testing for various telemetry signals against differing exporter types, I'd like to propose updating the configurations for traces, metrics, and logs, in order to push in a custom exporter or trace provider.

Describe the solution you'd like

In conjunction with #37044, this could look something like this:

func MetricExporterFactory() (sdkmetric.Exporter, error) {
...
   return otlpmetricgrpc.New(context.Background(), exporterOpts...)
}

...
mc := metrics.NewConfig()
mc.Endpoint = "localhost:1234"
mc.RunDuration = 5 * time.Second
mc.ExporterFactory = MetricExporterFactory
err := metrics.Start(mc)

Describe alternatives you've considered

No response

Additional context

This concept does rely on #37044 to go forward which would open up the API in general allowing for use of the telemetry generation logic. I'm hopeful we can make it work 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions