Skip to content

Do not require adding ObservationHandlers #87

@cfredri4

Description

@cfredri4

It would be much nicer if the observation handlers weren't needed. I.e. I don't want to have to do this:

ObservationConfig observationConfig = observationRegistry.observationConfig();
observationConfig.observationHandler(new ConnectionTracingObservationHandler(tracer));
observationConfig.observationHandler(new QueryTracingObservationHandler(tracer));
observationConfig.observationHandler(new ResultSetTracingObservationHandler(tracer));

I only want to do this:

var listener = new DataSourceObservationListener(observationRegistry);
return ProxyDataSourceBuilder.create(dataSource)
        .listener(listener)
        .methodListener(listener)
        .proxyResultSet()
        .build();

For most (all?) other cases where Micrometer is used, it's enough to only set/wrap with the ObservationRegistry (e.g. Kafka, JMS, RestClient, gRPC, MicrometerHttpClient, Lettuce, Cassandra to name a few).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions