Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azuremonitorexporter does not implement ExportSpans (Re-Open #27053) #35690

Open
pavgup opened this issue Oct 8, 2024 · 1 comment
Open

azuremonitorexporter does not implement ExportSpans (Re-Open #27053) #35690

pavgup opened this issue Oct 8, 2024 · 1 comment
Labels
bug Something isn't working exporter/azuremonitor needs triage New item requiring triage

Comments

@pavgup
Copy link

pavgup commented Oct 8, 2024

Component(s)

exporter/azuremonitor

What happened?

Description

Steps to Reproduce

func initMonitor() (*sdktrace.TracerProvider, error) {
	key := os.Getenv("INSTRUMENTATION_KEY")
	exporterConfig := azuremonitorexporter.Config{
		InstrumentationKey: configopaque.String(key),
	}
	factory := azuremonitorexporter.NewFactory()

	azExporter, err := factory.CreateTracesExporter(context.Background(), exporter.CreateSettings{}, exporterConfig)
	if err != nil {
		panic(err)
	}

	tp := sdktrace.NewTracerProvider(
		sdktrace.WithSampler(sdktrace.AlwaysSample()),
		sdktrace.WithBatcher(azExporter),
	)

	otel.SetTracerProvider(tp)
	otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))

	return tp, nil
}

Expected Result

TraceProvider created

Actual Result

The exporter is not able to be used WithBatcher because it does not implement ExportSpans

Collector version

v0.111.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@pavgup pavgup added bug Something isn't working needs triage New item requiring triage labels Oct 8, 2024
Copy link
Contributor

github-actions bot commented Oct 8, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/azuremonitor needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant