Skip to content

[#noissue] Add H2 ServiceType mapping for OTLP database spans - #13918

Open
jaehong-kim wants to merge 1 commit into
pinpoint-apm:masterfrom
jaehong-kim:codex/otlptrace-h2-db-detection-clean
Open

[#noissue] Add H2 ServiceType mapping for OTLP database spans#13918
jaehong-kim wants to merge 1 commit into
pinpoint-apm:masterfrom
jaehong-kim:codex/otlptrace-h2-db-detection-clean

Conversation

@jaehong-kim

Copy link
Copy Markdown
Contributor

No description provided.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.81%. Comparing base (260fd4b) to head (2eb9f48).
⚠️ Report is 129 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13918      +/-   ##
============================================
+ Coverage     33.19%   33.81%   +0.62%     
- Complexity    11535    11891     +356     
============================================
  Files          4152     4167      +15     
  Lines         97978    98847     +869     
  Branches      10387    10564     +177     
============================================
+ Hits          32520    33428     +908     
+ Misses        62646    62546     -100     
- Partials       2812     2873      +61     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class H2 database ServiceType resolution for OTLP client/database spans, so H2 traces are categorized with Pinpoint’s H2/H2_EXECUTE_QUERY codes instead of falling back to UNKNOWN_DB.

Changes:

  • Register H2 and H2_EXECUTE_QUERY via a new external type-provider YAML.
  • Normalize db.system / db.system.name inputs (trim + lowercase) when resolving DB ServiceType codes.
  • Add/extend unit tests to cover H2 mapping and db.system normalization behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
otlptrace/otlptrace-collector/src/test/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpTraceSpanEventMapperTest.java Adds span-mapping tests to ensure H2 OTLP database spans map to H2/H2_EXECUTE_QUERY ServiceTypes.
otlptrace/otlptrace-collector/src/test/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpDbSystemTypeResolverTest.java Adds tests verifying db.system normalization (case/whitespace) for H2 base/execute-query resolution.
otlptrace/otlptrace-collector/src/main/java/com/navercorp/pinpoint/otlp/trace/collector/mapper/OtlpDbSystemTypeResolver.java Normalizes db.system keys before lookup so resolution is tolerant to casing/whitespace.
agent-module/plugins/external/src/main/resources/META-INF/pinpoint/type-providers/h2-type-provider.yml Introduces ServiceType definitions for H2 and H2_EXECUTE_QUERY (codes 2750/2751).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +14
serviceTypes:
- code: 2750
name: 'H2'
desc: 'H2'
property:
terminal: true
includeDestinationId: true
- code: 2751
name: 'H2_EXECUTE_QUERY'
desc: 'H2_EXECUTE_QUERY'
property:
recordStatistics: true
terminal: true
includeDestinationId: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants