Skip to content

Conversation

@mlqn
Copy link

@mlqn mlqn commented Dec 3, 2025

Description

Fix typo in signing metric name

Related Issue(s)

  • PR itself

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Summary by CodeRabbit

Bug Fixes

  • Corrected a metric naming error in signing telemetry to ensure accurate data collection for service owner party operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

A metric name constant in the signing telemetry service has been corrected from "singing_get_service_owner_party" to "signing_get_service_owner_party", fixing a typo in the string literal value used for metric recording.

Changes

Cohort / File(s) Summary
Telemetry metric name correction
src/Altinn.App.Core/Features/Telemetry/Signing/Telemetry.SigningService.cs
String value of ServiceOwnerPartyConst.MetricNameGetServiceOwnerParty changed from "singing_get_service_owner_party" to "signing_get_service_owner_party"

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Single-line string correction with no logic or structural impact
  • Straightforward typo fix that requires minimal verification

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'Fix typo in signing metric name' accurately summarizes the main change: correcting 'singing_get_service_owner_party' to 'signing_get_service_owner_party' in the ServiceOwnerPartyConst metric name field.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/typo-in-metric-names

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mlqn mlqn changed the title Fix typo in signing metric name fix: typo in signing metric name Dec 3, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Altinn.App.Core/Features/Telemetry/Signing/Telemetry.SigningService.cs (1)

84-88: Typo fix is correct; verify impact on existing metrics/dashboards

The new value "signing_get_service_owner_party" is consistent with the signing domain and the surrounding metric names, so the code change itself looks good. However, this will likely rename the exported metric (via Metrics.CreateLibName), so any Prometheus rules, dashboards, or alerts that referenced the old typo value may stop working until updated. Consider whether you need a brief migration period (e.g., dual-publishing both names) and ensure any related documentation/queries are updated accordingly.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd5ddb7 and b50899e.

📒 Files selected for processing (1)
  • src/Altinn.App.Core/Features/Telemetry/Signing/Telemetry.SigningService.cs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.cs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.cs: Use CSharpier for code formatting (required before commits). Formatting happens automatically when building due to CSharpier.MSBuild
Use internal accessibility on types by default
Use sealed for classes unless inheritance is considered a valid use-case
Use Nullable Reference Types in C#
Remember to dispose IDisposable/IAsyncDisposable instances
For HTTP APIs, define ...Request and ...Response DTOs (e.g., LookupPersonRequest.cs and corresponding response)
Types meant to be implemented by apps should be marked with the ImplementableByApps attribute
Don't use .GetAwaiter().GetResult(), .Result(), .Wait() or other blocking APIs on Task
Don't use Async suffix for async methods
Write efficient code: Don't allocate unnecessarily (e.g., avoid calling ToString twice in a row, store in a variable; sometimes a for loop is better than LINQ)
Don't invoke the same async operation multiple times in the same codepath unless necessary
Don't await async operations in a loop (prefer batching, but maintain an upper bound on parallelism that makes sense)
Use strongly-typed configuration classes instead of untyped configuration
Register services in DI container properly following existing patterns

Files:

  • src/Altinn.App.Core/Features/Telemetry/Signing/Telemetry.SigningService.cs
🧠 Learnings (1)
📓 Common learnings
Learnt from: bjorntore
Repo: Altinn/app-lib-dotnet PR: 745
File: test/Altinn.App.Core.Tests/PublicApiTests.PublicApi_ShouldNotChange_Unintentionally.verified.txt:3656-3671
Timestamp: 2025-09-25T08:15:25.624Z
Learning: In PR Altinn/app-lib-dotnet#745, the team decided to defer adding idempotency documentation, enriched ServiceTaskFailedResult (code/title/message), and additional OTel spans for service tasks. Do not re-suggest these changes within this PR; propose a follow-up issue instead if needed.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Static code analysis
  • GitHub Check: Run dotnet build and test (windows-latest)
  • GitHub Check: Run dotnet build and test (ubuntu-latest)
  • GitHub Check: Run dotnet build and test (macos-latest)
  • GitHub Check: Analyze (csharp)

@mlqn mlqn changed the title fix: typo in signing metric name Fix typo in signing metric name Dec 3, 2025
@mlqn mlqn added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Dec 3, 2025
@mlqn mlqn added the backport-ignore This PR is a new feature and should not be cherry-picked onto release branches label Dec 13, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-ignore This PR is a new feature and should not be cherry-picked onto release branches bugfix Label Pull requests with bugfix. Used when generation releasenotes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants