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

Introduce jdbc.datasource-proxy.with-parent-only configuration property #21

Closed
quaff opened this issue May 18, 2023 · 1 comment
Closed

Comments

@quaff
Copy link

quaff commented May 18, 2023

If set jdbc.datasource-proxy.with-parent-only to true, then JDBC instrumentation should be ignored without parent Observation, I think it will mitigate #17

I have a system that polls a database every second with a simple query, and I will like to exclude it from traces reported to the Jaeger.

see micrometer-metrics/micrometer#3843 (comment)

@quaff
Copy link
Author

quaff commented May 31, 2023

We could use ObservationPredicate if micrometer-metrics/micrometer#3867 get merged, I'm going to close this.

	@Bean
	ObservationPredicate noParentlessDatabaseObservations() {
		return (name, context) -> {
			if (context instanceof DataSourceBaseContext) {
				return context.getParentObservation() != null;
			}
			return true;
		};
	}

@quaff quaff closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant