Skip to content

Add M2M insights documentation#6017

Open
RushanNanayakkara wants to merge 1 commit intowso2:masterfrom
RushanNanayakkara:master
Open

Add M2M insights documentation#6017
RushanNanayakkara wants to merge 1 commit intowso2:masterfrom
RushanNanayakkara:master

Conversation

@RushanNanayakkara
Copy link
Copy Markdown
Contributor

@RushanNanayakkara RushanNanayakkara commented Mar 24, 2026

Purpose

Introduce M2M Insights documentation

Summary by CodeRabbit

  • Documentation
    • Added M2M (Machine-to-Machine) activity tracking to organization insights with a new "M2M Authentications" visualization.
    • Updated insights latency documentation to include M2M token usage information.
    • Enhanced filtering options to support M2M activities with Client ID and Organization filters.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Walkthrough

Documentation 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

Cohort / File(s) Summary
M2M Authentication Documentation
en/includes/guides/organization-insights.md
Added M2M activity option to organization insights workflow. Introduced new "M2M Authentications" graph section with filtering instructions and activity selection. Extended insights latency explanation and filter-table entries to include M2M token usage with Client ID and Organization filter fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A whisker twitch, a careful scan,
M2M flows through our plan,
Insights now track token creation's way,
Client credentials dance and play!
Documentation hops, complete and keen,

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only includes the Purpose section but is missing required sections: Related PRs, Test environment, and Security checks. The Purpose section itself is minimal and lacks detail about the changes and context. Complete the PR description by adding all required template sections: Related PRs, Test environment, and Security checks. Expand the Purpose section with more context about why M2M insights documentation is needed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add M2M insights documentation' accurately describes the main change - adding M2M (Machine-to-Machine) insights documentation to the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1104b0f and e9935e8.

⛔ Files ignored due to path filters (1)
  • en/asgardeo/docs/assets/img/guides/organization-insights/m2m-authentications-graph.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • en/includes/guides/organization-insights.md

![User signups graph]({{base_path}}/assets/img/guides/organization-insights/user-signups-graph.png){: 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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).

![M2M authentications graph]({{base_path}}/assets/img/guides/organization-insights/m2m-authentications-graph.png){: 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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 -10

Repository: 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 -100

Repository: 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.md

Repository: 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.md

Repository: 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.md

Repository: 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.md

Repository: 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.md

Repository: 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.

Suggested change
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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant