Add tracing to Digital Credentials API get() flow [chromium/src : main]

1 view
Skip to first unread message

Mohamed Amir Yosef (Gerrit)

unread,
Nov 21, 2025, 6:49:03 AMNov 21
to Anushka Kulkarni, Tejas Dhagawkar, Christian Biesinger, chromium...@chromium.org, Kaan Icer, blink-...@chromium.org, derinel+wat...@google.com, npm+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, webauthn...@chromium.org, wfh+...@chromium.org, yigu+...@chromium.org
Attention needed from Anushka Kulkarni and Tejas Dhagawkar

Mohamed Amir Yosef added 4 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Mohamed Amir Yosef . resolved

I am very sorry for the delay!
I have added some comments!

File content/browser/digital_credentials/digital_identity_request_impl.h
Line 22, Patchset 4 (Parent):
Mohamed Amir Yosef . unresolved

nit: revert this please

File third_party/blink/renderer/modules/credentialmanagement/digital_identity_credential.cc
Line 85, Patchset 4 (Latest): TRACE_EVENT("content.digitalcredentials", "OnCompleteRequest", "status",
static_cast<int>(status), "request_type",
static_cast<int>(request_type), "protocol", protocol);
Mohamed Amir Yosef . unresolved

This is invoked for both create and get requests.
IMHO, it's better to filter here already!

Line 133, Patchset 4 (Latest): UseCounter::Count(resolver->GetExecutionContext(),
WebFeature::kIdentityDigitalCredentialsSuccess);
Mohamed Amir Yosef . unresolved

Unrelated but since we started the issuance OT, could you please split this too for get() and create() in a separate CL?

Open in Gerrit

Related details

Attention is currently required from:
  • Anushka Kulkarni
  • Tejas Dhagawkar
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: If9e0e7e3765bf35955d35567b792bae3612086c2
Gerrit-Change-Number: 7127319
Gerrit-PatchSet: 4
Gerrit-Owner: Anushka Kulkarni <anusku...@microsoft.com>
Gerrit-Reviewer: Mohamed Amir Yosef <ma...@chromium.org>
Gerrit-Reviewer: Tejas Dhagawkar <tdhag...@microsoft.com>
Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
Gerrit-CC: Kaan Icer <ic...@chromium.org>
Gerrit-Attention: Tejas Dhagawkar <tdhag...@microsoft.com>
Gerrit-Attention: Anushka Kulkarni <anusku...@microsoft.com>
Gerrit-Comment-Date: Fri, 21 Nov 2025 11:48:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Christian Biesinger (Gerrit)

unread,
Nov 24, 2025, 2:02:01 PMNov 24
to Anushka Kulkarni, Mohamed Amir Yosef, Tejas Dhagawkar, Christian Biesinger, chromium...@chromium.org, Kaan Icer, blink-...@chromium.org, derinel+wat...@google.com, npm+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, webauthn...@chromium.org, wfh+...@chromium.org, yigu+...@chromium.org
Attention needed from Anushka Kulkarni and Tejas Dhagawkar

Christian Biesinger added 7 comments

File base/trace_event/builtin_categories.h
Line 118, Patchset 4 (Latest): "Traces for the Digital Credentials API"),
Christian Biesinger . unresolved

shouldn't this be indented?

Line 117, Patchset 4 (Latest): perfetto::Category("content.digitalcredentials").SetDescription(
Christian Biesinger . unresolved

I would put this before content.fedcm because d comes before f alphabetically :)

File chrome/browser/digital_credentials/digital_identity_provider_android.cc
Line 48, Patchset 4 (Latest): TRACE_EVENT0(
Christian Biesinger . unresolved

AFAIK this is the legacy version of the macro and current versions should TRACE_EVENT(...). https://source.chromium.org/chromium/chromium/src/+/main:v8/src/tracing/trace-event-no-perfetto.h;l=104?q=TRACE_EVENT0&ss=chromium

File content/browser/digital_credentials/digital_identity_request_impl.cc
Line 473, Patchset 4 (Latest): TRACE_EVENT1("content.digitalcredentials", "DigitalIdentityRequestImpl::Get",
Christian Biesinger . unresolved

same here

File third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc
Line 1321, Patchset 4 (Latest): TRACE_EVENT0("content.digitalcredentials",
Christian Biesinger . unresolved

same here

File third_party/blink/renderer/modules/credentialmanagement/digital_identity_credential.cc
Line 85, Patchset 4 (Latest): TRACE_EVENT("content.digitalcredentials", "OnCompleteRequest", "status",
Christian Biesinger . resolved

here you do use the newer version already...?

Line 165, Patchset 4 (Latest): TRACE_EVENT0("content.digitalcredentials",
Christian Biesinger . unresolved

and here

Gerrit-Comment-Date: Mon, 24 Nov 2025 19:01:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Anushka Kulkarni (Gerrit)

unread,
Nov 27, 2025, 4:42:54 AMNov 27
to Mohamed Amir Yosef, Tejas Dhagawkar, Christian Biesinger, chromium...@chromium.org, Kaan Icer, blink-...@chromium.org, derinel+wat...@google.com, npm+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, webauthn...@chromium.org, wfh+...@chromium.org, yigu+...@chromium.org
Attention needed from Christian Biesinger, Mohamed Amir Yosef and Tejas Dhagawkar

Anushka Kulkarni added 10 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Anushka Kulkarni . resolved

All comments have been resolved

File base/trace_event/builtin_categories.h
Line 118, Patchset 4: "Traces for the Digital Credentials API"),
Christian Biesinger . resolved

shouldn't this be indented?

Anushka Kulkarni

Done

Line 117, Patchset 4: perfetto::Category("content.digitalcredentials").SetDescription(
Christian Biesinger . resolved

I would put this before content.fedcm because d comes before f alphabetically :)

Anushka Kulkarni

Done

File chrome/browser/digital_credentials/digital_identity_provider_android.cc
Line 48, Patchset 4: TRACE_EVENT0(
Christian Biesinger . resolved

AFAIK this is the legacy version of the macro and current versions should TRACE_EVENT(...). https://source.chromium.org/chromium/chromium/src/+/main:v8/src/tracing/trace-event-no-perfetto.h;l=104?q=TRACE_EVENT0&ss=chromium

Anushka Kulkarni

Done

File content/browser/digital_credentials/digital_identity_request_impl.h
Mohamed Amir Yosef . resolved

nit: revert this please

Anushka Kulkarni

Done

File content/browser/digital_credentials/digital_identity_request_impl.cc
Line 473, Patchset 4: TRACE_EVENT1("content.digitalcredentials", "DigitalIdentityRequestImpl::Get",
Christian Biesinger . resolved

same here

Anushka Kulkarni

Done

File third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc
Line 1321, Patchset 4: TRACE_EVENT0("content.digitalcredentials",
Christian Biesinger . resolved

same here

Anushka Kulkarni

Done

File third_party/blink/renderer/modules/credentialmanagement/digital_identity_credential.cc
Line 85, Patchset 4: TRACE_EVENT("content.digitalcredentials", "OnCompleteRequest", "status",

static_cast<int>(status), "request_type",
static_cast<int>(request_type), "protocol", protocol);
Mohamed Amir Yosef . resolved

This is invoked for both create and get requests.
IMHO, it's better to filter here already!

Anushka Kulkarni

Done

Line 133, Patchset 4: UseCounter::Count(resolver->GetExecutionContext(),
WebFeature::kIdentityDigitalCredentialsSuccess);
Mohamed Amir Yosef . resolved

Unrelated but since we started the issuance OT, could you please split this too for get() and create() in a separate CL?

Anushka Kulkarni

The required changes have already been made

Line 165, Patchset 4: TRACE_EVENT0("content.digitalcredentials",
Christian Biesinger . resolved

and here

Anushka Kulkarni

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Biesinger
  • Mohamed Amir Yosef
  • Tejas Dhagawkar
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: If9e0e7e3765bf35955d35567b792bae3612086c2
    Gerrit-Change-Number: 7127319
    Gerrit-PatchSet: 6
    Gerrit-Owner: Anushka Kulkarni <anusku...@microsoft.com>
    Gerrit-Reviewer: Mohamed Amir Yosef <ma...@chromium.org>
    Gerrit-Reviewer: Tejas Dhagawkar <tdhag...@microsoft.com>
    Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
    Gerrit-CC: Kaan Icer <ic...@chromium.org>
    Gerrit-Attention: Tejas Dhagawkar <tdhag...@microsoft.com>
    Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
    Gerrit-Attention: Mohamed Amir Yosef <ma...@chromium.org>
    Gerrit-Comment-Date: Thu, 27 Nov 2025 09:42:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Christian Biesinger <cbies...@chromium.org>
    Comment-In-Reply-To: Mohamed Amir Yosef <ma...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christian Biesinger (Gerrit)

    unread,
    Nov 27, 2025, 11:07:23 AMNov 27
    to Anushka Kulkarni, Mohamed Amir Yosef, Tejas Dhagawkar, Christian Biesinger, chromium...@chromium.org, Kaan Icer, blink-...@chromium.org, derinel+wat...@google.com, npm+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, webauthn...@chromium.org, wfh+...@chromium.org, yigu+...@chromium.org
    Attention needed from Anushka Kulkarni, Mohamed Amir Yosef and Tejas Dhagawkar

    Christian Biesinger added 1 comment

    File third_party/blink/renderer/modules/credentialmanagement/digital_identity_credential.cc
    Line 89, Patchset 6 (Latest): TRACE_EVENT("content.digitalcredentials", "OnCompleteRequest", "status",
    Christian Biesinger . unresolved

    so this is now scoped to the if, whereas the other trace events cover the rest of the function.

    If this is intentionally scoped to the if, `TRACE_EVENT_INSTANT` seems clearer.
    if not, I am not sure what the best way to handle that is; TRACE_EVENT_BEGIN/END would work but seems not ideal

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anushka Kulkarni
    • Mohamed Amir Yosef
    • Tejas Dhagawkar
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: If9e0e7e3765bf35955d35567b792bae3612086c2
        Gerrit-Change-Number: 7127319
        Gerrit-PatchSet: 6
        Gerrit-Owner: Anushka Kulkarni <anusku...@microsoft.com>
        Gerrit-Reviewer: Mohamed Amir Yosef <ma...@chromium.org>
        Gerrit-Reviewer: Tejas Dhagawkar <tdhag...@microsoft.com>
        Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
        Gerrit-CC: Kaan Icer <ic...@chromium.org>
        Gerrit-Attention: Tejas Dhagawkar <tdhag...@microsoft.com>
        Gerrit-Attention: Mohamed Amir Yosef <ma...@chromium.org>
        Gerrit-Attention: Anushka Kulkarni <anusku...@microsoft.com>
        Gerrit-Comment-Date: Thu, 27 Nov 2025 16:07:17 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Anushka Kulkarni (Gerrit)

        unread,
        Dec 15, 2025, 10:20:18 AM (5 days ago) Dec 15
        to Mohamed Amir Yosef, Tejas Dhagawkar, Christian Biesinger, chromium...@chromium.org, Kaan Icer, blink-...@chromium.org, derinel+wat...@google.com, npm+...@chromium.org, spang...@chromium.org, tracing...@chromium.org, webauthn...@chromium.org, wfh+...@chromium.org, yigu+...@chromium.org
        Attention needed from Christian Biesinger, Mohamed Amir Yosef and Tejas Dhagawkar

        Anushka Kulkarni added 1 comment

        File third_party/blink/renderer/modules/credentialmanagement/digital_identity_credential.cc
        Line 89, Patchset 6: TRACE_EVENT("content.digitalcredentials", "OnCompleteRequest", "status",
        Christian Biesinger . resolved

        so this is now scoped to the if, whereas the other trace events cover the rest of the function.

        If this is intentionally scoped to the if, `TRACE_EVENT_INSTANT` seems clearer.
        if not, I am not sure what the best way to handle that is; TRACE_EVENT_BEGIN/END would work but seems not ideal

        Anushka Kulkarni

        Changed to TRACE_EVENT_INSTANT since the event is scoped to the if-block and doesn't measure the function's actual work; this clarifies it's marking a point in time, not a duration.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Christian Biesinger
        • Mohamed Amir Yosef
        • Tejas Dhagawkar
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: If9e0e7e3765bf35955d35567b792bae3612086c2
            Gerrit-Change-Number: 7127319
            Gerrit-PatchSet: 7
            Gerrit-Owner: Anushka Kulkarni <anusku...@microsoft.com>
            Gerrit-Reviewer: Mohamed Amir Yosef <ma...@chromium.org>
            Gerrit-Reviewer: Tejas Dhagawkar <tdhag...@microsoft.com>
            Gerrit-CC: Christian Biesinger <cbies...@chromium.org>
            Gerrit-CC: Kaan Icer <ic...@chromium.org>
            Gerrit-Attention: Tejas Dhagawkar <tdhag...@microsoft.com>
            Gerrit-Attention: Christian Biesinger <cbies...@chromium.org>
            Gerrit-Attention: Mohamed Amir Yosef <ma...@chromium.org>
            Gerrit-Comment-Date: Mon, 15 Dec 2025 15:19:44 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Christian Biesinger <cbies...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages