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

Provide configuration properties for customising the auto-configured BatchSpanProcessor #44644

Closed
as428y opened this issue Mar 7, 2025 · 1 comment
Labels
status: superseded An issue that has been superseded by another

Comments

@as428y
Copy link

as428y commented Mar 7, 2025

Below are internal Otel properties are not auto-configured it requires to create a bean to populate non-default values

Per support advice asking for enhancement

otel.bsp.schedule.delay
otel.bsp.max.queue.size
otel.bsp.max.export.batch.size
otel.bsp.export.timeout

Example of bean

    @Bean
    BatchSpanProcessor otelSpanProcessorImpl(SpanExporters spanExporters,
                                         ObjectProvider<SpanExportingPredicate> spanExportingPredicates,
                                         ObjectProvider<SpanReporter> spanReporters,
                                         ObjectProvider<SpanFilter> spanFilters,
                                         ObjectProvider<MeterProvider> meterProvider)
    {
        BatchSpanProcessorBuilder builder = BatchSpanProcessor
                .builder(new CompositeSpanExporter( spanExporters.list(),
                        spanExportingPredicates.orderedStream().toList(),
                        spanReporters.orderedStream().toList(),
                        spanFilters.orderedStream().toList())
                );

        meterProvider.ifAvailable(builder::setMeterProvider);

        builder.setMaxQueueSize(2048) //otel.bsp.max.queue.size
                .setMaxExportBatchSize(1) //otel.bsp.max.export.batch.size
                .setScheduleDelay(Duration.ofMillis(9000)) //otel.bsp.schedule.delay
                .setExporterTimeout(Duration.ofMillis(30000)) //otel.bsp.export.timeout
        //.setExportTimeoutMillis(1);
        ;

        return builder.build();
    }
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 7, 2025
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 7, 2025
@wilkinsona wilkinsona added this to the 3.x milestone Mar 7, 2025
@wilkinsona wilkinsona changed the title Allow autoconfiguration for internal OTEL properties Provide configuration properties for customising the auto-configured BatchSpanProcessor Mar 7, 2025
@mhalbritter mhalbritter removed the type: enhancement A general enhancement label Mar 13, 2025
@mhalbritter mhalbritter removed this from the 3.x milestone Mar 13, 2025
@mhalbritter
Copy link
Contributor

Superseded by #44655.

@mhalbritter mhalbritter closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2025
@mhalbritter mhalbritter added the status: superseded An issue that has been superseded by another label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

4 participants