Add M2M insights documentation#6017
Conversation
WalkthroughDocumentation expanded to include Machine-to-Machine (M2M) authentication within organization insights. A new "M2M Authentications" graph section was added, detailing M2M token issuance via the client credentials grant. Filtering instructions and activity options were updated to support M2M user-activity tracking with Client ID and Organization filter fields. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
en/includes/guides/organization-insights.md (2)
157-170: Bold "Protocol section" as a UI element.On line 161, "Protocol section" refers to a specific UI section/tab and should be formatted in bold, consistent with the guideline to format UI labels and sections in bold.
✨ Proposed formatting update
- <td>Filter M2M token requests based on the client ID of an M2M application in your organization.</br></br> - (You can find the client ID of an application from the Protocol section of the application on the {{ product_name }} Console.)</br></br> + <td>Filter M2M token requests based on the client ID of an M2M application in your organization.</br></br> + (You can find the client ID of an application from the <b>Protocol</b> section of the application on the {{ product_name }} Console.)</br></br> Example for a client ID: <code>rXJ4z9k2mL8pQvN5wX1aB3</code>Otherwise, the M2M filter documentation is clear, well-structured, and follows the established table pattern.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@en/includes/guides/organization-insights.md` around lines 157 - 170, The UI label "Protocol section" in the Client ID description should be formatted in bold to match UI element styling; find the table row containing the "Client ID" cell (text string "Client ID" and the sentence containing "Protocol section of the application on the {{ product_name }} Console") and change the plain text "Protocol section" to bold formatting so it renders as a UI label in the documentation.
74-74: Bold activity names for UI consistency.The activity names (Login, Registration, M2M) should be bold when referring to selectable UI options, consistent with how they appear in the activity list (lines 14-16) and the guideline to format UI labels in bold.
✨ Proposed formatting update
-1. On the {{ product_name }} Console, go to **Insights**, and select an activity (Login, Registration, or M2M). +1. On the {{ product_name }} Console, go to **Insights**, and select an activity (**Login**, **Registration**, or **M2M**).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@en/includes/guides/organization-insights.md` at line 74, Update the sentence that reads "On the {{ product_name }} Console, go to **Insights**, and select an activity (Login, Registration, or M2M)." so the activity names are formatted in bold to match UI label styling; change "(Login, Registration, or M2M)" to "(**Login**, **Registration**, or **M2M**)" ensuring only the activity labels are bolded and punctuation/spacing remains consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@en/includes/guides/organization-insights.md`:
- Line 61: Update the sentence in the organization insights guide that reads
"This graph in M2M insights represents the number of new M2M tokens issued to
your organizations within the selected duration." to use singular "organization"
for consistency with the rest of the document; change "your organizations" to
"your organization" in the content of organization-insights.md (the sentence
describing the graph in M2M insights).
- Line 66: Replace the incorrect URL used for the "client credentials grant"
link in the markdown line that currently points to
{{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites;
update the href to
{{base_path}}/references/grant-types/#client-credentials-grant so the link text
"client credentials grant" points to the correct client credentials grant
documentation in organization-insights.md.
---
Nitpick comments:
In `@en/includes/guides/organization-insights.md`:
- Around line 157-170: The UI label "Protocol section" in the Client ID
description should be formatted in bold to match UI element styling; find the
table row containing the "Client ID" cell (text string "Client ID" and the
sentence containing "Protocol section of the application on the {{ product_name
}} Console") and change the plain text "Protocol section" to bold formatting so
it renders as a UI label in the documentation.
- Line 74: Update the sentence that reads "On the {{ product_name }} Console, go
to **Insights**, and select an activity (Login, Registration, or M2M)." so the
activity names are formatted in bold to match UI label styling; change "(Login,
Registration, or M2M)" to "(**Login**, **Registration**, or **M2M**)" ensuring
only the activity labels are bolded and punctuation/spacing remains consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f728c236-c0e0-47a3-baa4-441004af6383
⛔ Files ignored due to path filters (1)
en/asgardeo/docs/assets/img/guides/organization-insights/m2m-authentications-graph.pngis excluded by!**/*.png
📒 Files selected for processing (1)
en/includes/guides/organization-insights.md
| {: width="700" style="display: block; margin: 0; border: 0.3px solid lightgrey;"} | ||
|
|
||
| ### M2M Authentications | ||
| This graph in M2M insights represents the number of new M2M tokens issued to your organizations within the selected duration. By hovering your mouse over a point on the graph, you can view the specific count of M2M token requests for each day. |
There was a problem hiding this comment.
Use singular "organization" for consistency.
The phrase "to your organizations" should be "to your organization" to align with the established pattern in this document where users view insights for one organization at a time (see lines 8, 23).
📝 Suggested fix
-This graph in M2M insights represents the number of new M2M tokens issued to your organizations within the selected duration. By hovering your mouse over a point on the graph, you can view the specific count of M2M token requests for each day.
+This graph in M2M insights represents the number of new M2M tokens issued to your organization within the selected duration. By hovering your mouse over a point on the graph, you can view the specific count of M2M token requests for each day.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This graph in M2M insights represents the number of new M2M tokens issued to your organizations within the selected duration. By hovering your mouse over a point on the graph, you can view the specific count of M2M token requests for each day. | |
| This graph in M2M insights represents the number of new M2M tokens issued to your organization within the selected duration. By hovering your mouse over a point on the graph, you can view the specific count of M2M token requests for each day. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@en/includes/guides/organization-insights.md` at line 61, Update the sentence
in the organization insights guide that reads "This graph in M2M insights
represents the number of new M2M tokens issued to your organizations within the
selected duration." to use singular "organization" for consistency with the rest
of the document; change "your organizations" to "your organization" in the
content of organization-insights.md (the sentence describing the graph in M2M
insights).
| {: width="700" style="display: block; margin: 0; border: 0.3px solid lightgrey;"} | ||
|
|
||
| !!! note | ||
| This graph only tracks tokens issued via the [client credentials grant]({{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites). Reissued tokens are not counted. |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Find the correct path for client credentials grant documentation
# Search for files documenting client credentials grant
fd -e md -x grep -l "client credentials" {} \; | head -20
# Search for specific OAuth grant type documentation
rg -l "client.credentials.grant" --type=md | head -10Repository: wso2/docs-is
Length of output: 2066
🏁 Script executed:
# Read the context around line 66 in the file
cat -n en/includes/guides/organization-insights.md | sed -n '60,75p'Repository: wso2/docs-is
Length of output: 1088
🏁 Script executed:
# Check the grant-types.md file to see what client credentials grant documentation exists
cat -n en/includes/references/grant-types.md | head -100Repository: wso2/docs-is
Length of output: 4751
🏁 Script executed:
# Search for the actual href in the organization-insights.md file around line 66
rg -A 2 -B 2 "client credentials grant" en/includes/guides/organization-insights.mdRepository: wso2/docs-is
Length of output: 272
🏁 Script executed:
# Find the client credentials grant section in grant-types.md
rg -n "##.*[Cc]lient.*[Cc]redential" en/includes/references/grant-types.mdRepository: wso2/docs-is
Length of output: 87
🏁 Script executed:
# Get the broader context of the client credentials grant section
rg -A 20 "##.*[Cc]lient.*[Cc]redential" en/includes/references/grant-types.mdRepository: wso2/docs-is
Length of output: 1377
🏁 Script executed:
# Check linking patterns used elsewhere in organization-insights.md
rg -n "base_path.*references" en/includes/guides/organization-insights.mdRepository: wso2/docs-is
Length of output: 38
🏁 Script executed:
# Check linking patterns used elsewhere in organization-insights.md for guides
rg -n "base_path.*guides" en/includes/guides/organization-insights.mdRepository: wso2/docs-is
Length of output: 1601
Update link to point to client credentials grant documentation.
The link text says "client credentials grant" but the URL points to {{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites, which documents the authorization code flow. Change the link to {{base_path}}/references/grant-types/#client-credentials-grant to correctly reference the client credentials grant documentation.
Diff
- This graph only tracks tokens issued via the [client credentials grant]({{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites). Reissued tokens are not counted.
+ This graph only tracks tokens issued via the [client credentials grant]({{base_path}}/references/grant-types/#client-credentials-grant). Reissued tokens are not counted.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This graph only tracks tokens issued via the [client credentials grant]({{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites). Reissued tokens are not counted. | |
| This graph only tracks tokens issued via the [client credentials grant]({{base_path}}/references/grant-types/#client-credentials-grant). Reissued tokens are not counted. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@en/includes/guides/organization-insights.md` at line 66, Replace the
incorrect URL used for the "client credentials grant" link in the markdown line
that currently points to
{{base_path}}/guides/authentication/oidc/implement-auth-code/#prerequisites;
update the href to
{{base_path}}/references/grant-types/#client-credentials-grant so the link text
"client credentials grant" points to the correct client credentials grant
documentation in organization-insights.md.
Purpose
Introduce M2M Insights documentation
Summary by CodeRabbit