-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(apim): add diagnostics settings #1423
Conversation
📝 WalkthroughWalkthroughThis pull request modifies the Terraform configuration for Azure API Management diagnostics by renaming an existing diagnostic resource and adding a new one. The Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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)
infrastructure/adminservices-test/altinn-apim-test-rg/analytics.tf (1)
18-65
: Comprehensive Diagnostic Configuration Review
The newazurerm_api_management_diagnostic
resource is well-structured and covers all necessary aspects of diagnostics by including detailed blocks for frontend and backend requests/responses. A few points for your consideration:
- Sampling Percentage: The
sampling_percentage
is set to 0.0, which implies that no traffic will be sampled. Confirm that this is the intended behavior for your test environment.- Payload Capture: The setting
body_bytes = 32
is applied consistently. Verify that capturing 32 bytes is sufficient to obtain the required diagnostic details.- Headers Logging: The lists under all header logging blocks (
frontend_request
,frontend_response
,backend_request
, andbackend_response
) are comprehensive. Double-check that these headers align with your logging and observability standards.
Overall, the diagnostic settings enhance the observability for the API Management service effectively.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
infrastructure/adminservices-test/altinn-apim-test-rg/analytics.tf
(1 hunks)infrastructure/adminservices-test/altinn-apim-test-rg/apim.tf
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: altinn-apim-test-rg
infrastructure/adminservices-test/altinn-apim-test-rg/apim.tf
[error] 1-1: Terraform formatting check failed. Run 'terraform fmt' to format the code.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
infrastructure/adminservices-test/altinn-apim-test-rg/apim.tf (1)
1-9
: Terraform Formatting Consistency
The resource block now includes a blank line (at line 7) between thepublisher_email
andsku_name
attributes. However, the pipeline error indicates that the file does not pass the Terraform formatting check. Please runterraform fmt
to auto-format the file according to Terraform’s style guidelines.🧰 Tools
🪛 GitHub Actions: altinn-apim-test-rg
[error] 1-1: Terraform formatting check failed. Run 'terraform fmt' to format the code.
infrastructure/adminservices-test/altinn-apim-test-rg/analytics.tf (2)
1-6
: Application Insights Resource Configuration
The newazurerm_application_insights
resource is clearly defined with proper variable interpolation for naming, resource group association, and location setup. Consider reviewing if additional optional settings (e.g., retention policies or sampling configs) might further enhance your monitoring configuration later on.
8-16
: API Management Logger Setup
Theazurerm_api_management_logger
resource is correctly integrated with the Application Insights resource via the instrumentation key. Ensure that the referencedapi_management_name
is accurate and that the logger meets the telemetry requirements for your diagnostics testing.
Terraform environment testFormat and Style 🖌
|
Context | Values |
---|---|
Pusher | @tjololo |
Action | workflow_dispatch |
Working Directory | ./infrastructure/adminservices-test/altinn-apim-test-rg |
State File | github.com/altinn/altinn-platform/environments/test/altinn-apim-test-rg.tfstate |
Plan File | github.com_altinn_altinn-platform_environments_test_altinn-apim-test-rg.tfstate.tfplan |
LGTM but why does it need its own AI (app insights)? I thought it was gonna use either the tenant/owner's or ours. |
Just a test apim that I use to test the removal of subscription keys and extra logging (trace/metrics for the client id in the JWT-token) Once I'm done the whole environment is going to be deleted. |
Description
Add diagnostics settings to test apim
Related Issue(s)
Verification
Documentation
Summary by CodeRabbit
New Features
Style