Add Datadog APM and metrics hooks to Article module#575
Open
devin-ai-integration[bot] wants to merge 3 commits intomasterfrom
Open
Add Datadog APM and metrics hooks to Article module#575devin-ai-integration[bot] wants to merge 3 commits intomasterfrom
devin-ai-integration[bot] wants to merge 3 commits intomasterfrom
Conversation
- Add dd-trace-api, micrometer-registry-datadog, actuator, and AOP dependencies - Create observability package with DatadogConfig and ArticleMetrics - Add @trace annotations to ArticleCommandService for APM spans - Add @timed annotations to ArticleApi and ArticleFavoriteApi endpoints - Track custom business metrics: articles created/updated/deleted/favorited - Configure Datadog metrics export in application.properties - Update tests with MockBean for ArticleMetrics Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Allow unauthenticated access to /actuator/health, /actuator/info, and /actuator/metrics/** so monitoring tools and load balancers can reach them without JWT tokens. Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
Ensures article delete and favorite metrics are recorded for both REST and GraphQL code paths. Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Datadog observability hooks to the Article module for demo purposes. This is a focused, single-module integration covering both APM tracing and custom business metrics.
What's included:
dd-trace-api,micrometer-registry-datadog,spring-boot-starter-actuator,spring-boot-starter-aopio.spring.observabilitypackage:DatadogConfig— Micrometer registry with common tags (service,framework) and@TimedAOP supportArticleMetrics— Custom counters forarticles.created,articles.updated,articles.deleted,articles.favorited@Traceannotations onArticleCommandService.createArticle()andupdateArticle()for Datadog APM spans@Timedannotations onArticleApi(GET, DELETE) andArticleFavoriteApi(POST) endpoints/actuator/health,/actuator/info,/actuator/metrics/**application.properties(disabled by default; setDD_METRICS_ENABLED=trueandDD_API_KEYto activate)How to run with Datadog APM:
Review & Testing Checklist for Human
./gradlew clean testpasses (68/68 tests green)DD_METRICS_ENABLEDdefaults tofalse)WebSecurityConfigNotes
./gradlew spotlessCheck) fails on the base branch too with Java 17 due to google-java-format module access restrictions — this is a pre-existing issue, not introduced by this PR.dd-java-agent.jaris a runtime-only component (not bundled). Download it from Datadog releases when running the app.Link to Devin session: https://app.devin.ai/sessions/95305e1afc44494abc08f411e3a94c30
Requested by: @achalc
Devin Review