Repository navigation
Conversation
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Co-authored-by: Eve Bernhard <115796475+evebrnd@users.noreply.github.com> Signed-off-by: ferial OUKOUKAS <75682459+foukou19@users.noreply.github.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
3229034 to
4bad155
Compare
Code coverage overviewLanguages: Java Java / code-coverage/jacoco
View coverage of the 9 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
Signed-off-by: ferial OUKOUKAS <75682459+foukou19@users.noreply.github.com>
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com> Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved metric accuracy and label-cardinality issues undermine reliable monitoring.
5 open findings
Limit mapping catch to mapping-level failure metrics · New Avoid double-counting and misclassifying entity validation failures · New Pass resolved connector identifier explicitly to decoding metrics · New Record oversized payload decoding errors exactly once · New Bound encoding metric labels to prevent cardinality growth · New
What changed in this PR
Adds OpenTelemetry metrics to idp-core’s webhook ingestion pipeline.
Changes:
- Instruments security validation, payload decoding, mapping, and entity operations.
- Adds shared metric constants, helpers, and meter configuration.
- Updates test setup and telemetry dependencies.
| File | Description |
|---|---|
| src/test/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/processor/IngestionProcessorTest.java | Supplies a test meter. |
| src/test/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/processor/DecodingProcessorTest.java | Updates constructors with a meter. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/processor/SecurityProcessor.java | Records security outcomes. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/processor/IngestionProcessor.java | Records mapping and entity metrics. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/processor/decoder/DecodingProcessor.java | Records decoding outcomes and payload sizes. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/metrics/IngestionObservabilitySupport.java | Adds shared instrumentation helpers. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/configuration/IngestionObservabilityConstants.java | Defines metric names and attributes. |
| src/main/java/com/decathlon/idp_core/infrastructure/adapters/ingestion/configuration/IngestionMetricsConfiguration.java | Configures scoped meters. |
| pom.xml | Adds telemetry API and testing dependencies. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| incrementCounter(IngestionObservabilityConstants.FUNCTIONAL_VALIDATION_FAILED_TOTAL, | ||
| ATTRIBUTE_CONNECTOR, connectorIdentifier, "mapping_id", mappingId, | ||
| ATTRIBUTE_REASON, exception.getClass().getSimpleName()); | ||
| recordEntityFailureMetrics(connectorIdentifier, exception); |
| incrementCounter(IngestionObservabilityConstants.ENTITY_VALIDATION_ERRORS_TOTAL, | ||
| ATTRIBUTE_TEMPLATE, templateIdentifier, ATTRIBUTE_CONNECTOR, connectorIdentifier, | ||
| ATTRIBUTE_REASON, exception.getClass().getSimpleName()); |
| String connector = headers == null | ||
| ? "unknown" | ||
| : String.valueOf(headers.getOrDefault("connector", "unknown")); |
| if (!(exception instanceof WebhookDecodingException)) { | ||
| incrementDecodeErrorMetric(connector, exception.getClass().getSimpleName()); | ||
| } |
| return new String(decodedPayload, StandardCharsets.UTF_8); | ||
| String result = new String(decodedPayload, StandardCharsets.UTF_8); | ||
| recordPayloadSizeMetric(connector, decodedPayload.length); | ||
| incrementDecodedMetric(connector, String.join(",", encodingChain)); |
There was a problem hiding this comment.
🟡 Changes recommended
The new OpenTelemetry meters are not connected to the configured metrics export path.
6 open findings
Connect OpenTelemetry meters to the configured metrics exporter · New Bound encoding metric labels to prevent cardinality growth Record oversized payload decoding errors exactly once Pass resolved connector identifier explicitly to decoding metrics Avoid double-counting and misclassifying entity validation failures Limit mapping catch to mapping-level failure metrics
🧠 Review effort: Balanced
| public Meter ingestionMeter(OpenTelemetry openTelemetry) { | ||
| return openTelemetry.getMeterProvider().meterBuilder("com.decathlon.idp_core.ingestion") | ||
| .build(); |
072443b to
33e8861
Compare
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
33e8861 to
d55eb94
Compare
5178c90 to
7b0813f
Compare
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
7b0813f to
7d67e93
Compare
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
3da9835 to
1bed986
Compare
Signed-off-by: foukou19 <ferial.oukoukas@decathlon.com>
1bed986 to
86413c1
Compare
|




PR Description
What this PR Provides
Fixes
Review
The reviewer must double-check these points:
!after the type/scope to identify the breakingchange in the release note and ensure we will release a major version.
How to test
Please refer (copy/paste) the test section from the User Story. This should include
(for example, ensure the data xxx exists in idp-back to be able to test the feature)
(for example, go to page xxx, fill the xxx field and click the 'send' button)
(for example, there is a link in the database between component X and component Y.
You can retrieve the information with a
GETrequest to the API)Breaking changes (if any)
Context of the Breaking Change
For example: we redefined the component types list in the DPAC referential
Result of the Breaking Change
For example: your component of type xxx will migrate to the type yyy