-
Notifications
You must be signed in to change notification settings - Fork 946
Add automatic MongoDB instrumentation to the OTel starter #11211
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
Conversation
@jeanbisutti this test only fails in spring native mode with the following error:
Can you help? |
@zeitlinger It seems related to the Spring code, not the OTel Starter code (to check). In this case, the following code in the
|
@zeitlinger I confirm that the GraalVM native issue is related to the Spring code, not the OpenTelemetry code. I have pushed a fix on your branch. |
5fe8db7
to
93f6c20
Compare
93f6c20
to
ea0c629
Compare
...t-3/src/test/java/io/opentelemetry/smoketest/GraalVmNativeMongodbSpringStarterSmokeTest.java
Outdated
Show resolved
Hide resolved
1cf8c56
to
5070000
Compare
...sts-otel-starter/spring-boot-3/src/main/java/io/opentelemetry/spring/smoketest/Customer.java
Outdated
Show resolved
Hide resolved
...sts-otel-starter/spring-boot-3/src/main/java/io/opentelemetry/spring/smoketest/Customer.java
Outdated
Show resolved
Hide resolved
...g-boot-3/src/test/java/io/opentelemetry/smoketest/AbstractMongodbSpringStarterSmokeTest.java
Outdated
Show resolved
Hide resolved
...spring-boot-3/src/test/java/io/opentelemetry/smoketest/JvmMongodbSpringStarterSmokeTest.java
Outdated
Show resolved
Hide resolved
...t-3/src/test/java/io/opentelemetry/smoketest/GraalVmNativeMongodbSpringStarterSmokeTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename the PR to something more specific, like "Add automatic MongoDB instrumentation to the OTel starter"?
...-3/src/main/java/io/opentelemetry/spring/smoketest/OtelSpringStarterSmokeTestController.java
Outdated
Show resolved
Hide resolved
...g-boot-3/src/test/java/io/opentelemetry/smoketest/AbstractMongodbSpringStarterSmokeTest.java
Outdated
Show resolved
Hide resolved
.../spring/autoconfigure/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java
Outdated
Show resolved
Hide resolved
…lemetry/smoketest/JvmMongodbSpringStarterSmokeTest.java Co-authored-by: Jean Bisutti <jean.bisutti@gmail.com>
MongoTelemetry.builder(openTelemetry) | ||
.setStatementSanitizationEnabled( | ||
config.getBoolean( | ||
"otel.instrumentation.mongo.statement-sanitizer.enabled", true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agent uses the value of common sanitizer property as the default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in #11350
@EventListener(ApplicationReadyEvent.class) | ||
public void loadData() { | ||
jdbcTemplate | ||
.getObject() | ||
.execute("create table test_table (id bigint not null, primary key (id))"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this related to mongo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved from another class so that the mongo test is not affected
Fixes #11210