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

Use repository interface name in spring data operation name #5352

Merged
merged 3 commits into from
Feb 16, 2022

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Feb 11, 2022

Currently spring data operation name uses the declaring class of the invoked method. The problem with this is that some of these methods are defined in multiple interfaces and which makes the test flaky. https://ge.opentelemetry.io/s/xd5i7f7go3hh2/tests/:instrumentation:spring:spring-data-1.8:javaagent:test/SpringJpaTest/test%20CRUD?top-execution=1
Additionally both JpaRepository and CrudRepository that are usually used in operation name are really spring data classes which makes the operation name a bit useless. This pr changes the repository name to use the actual repository interface.

@laurit laurit requested a review from a team February 11, 2022 12:42
laurit and others added 2 commits February 11, 2022 17:01
…/io/opentelemetry/javaagent/instrumentation/spring/data/SpringDataInstrumentationModule.java

Co-authored-by: Mateusz Rzeszutek <[email protected]>
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally both JpaRepository and CrudRepository that are usually used in operation name are really spring data classes which makes the operation name a bit useless. This pr changes the repository name to use the actual repository interface.

nice

@laurit laurit merged commit 53359f0 into open-telemetry:main Feb 16, 2022
@laurit laurit deleted the spring-data-operation-name branch February 16, 2022 10:04
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
…emetry#5352)

* Use repository interface name in spring data operation name

* Update instrumentation/spring/spring-data-1.8/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/data/SpringDataInstrumentationModule.java

Co-authored-by: Mateusz Rzeszutek <[email protected]>

* spotless

Co-authored-by: Mateusz Rzeszutek <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants