Unverified Commit 4bd96b3d authored by Hong Minhee's avatar Hong Minhee
Browse files

Rename span 'docloader.fetch' to 'activitypub.fetch_document' for consistency

This change aligns the document loader span name with the existing
naming convention used by other spans in the codebase, where all
ActivityPub-related operations use the 'activitypub.*' namespace.
parent 379c2be3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ To be released.
 -  Added OpenTelemetry spans for previously uninstrumented operations:
    [[#323]]

     -  Added `docloader.fetch` span for document loader operations,
     -  Added `activitypub.fetch_document` span for document loader operations,
        tracking URL fetching, HTTP redirects, and final document URLs.
     -  Added `activitypub.verify_key_ownership` span for cryptographic
        key ownership verification, recording actor ID, key ID, verification
+1 −1
Original line number Diff line number Diff line
@@ -174,9 +174,9 @@ spans:
| `activitypub.outbox`                                | Consumer    | Dequeues the ActivityPub activity to send.    |
| `activitypub.outbox`                                | Producer    | Enqueues the ActivityPub activity to send.    |
| `activitypub.parse_object`                          | Internal    | Parses the Activity Streams object.           |
| `activitypub.fetch_document`                        | Client      | Fetches a remote JSON-LD document.            |
| `activitypub.send_activity`                         | Client      | Sends the ActivityPub activity.               |
| `activitypub.verify_key_ownership`                  | Internal    | Verifies actor ownership of a key.            |
| `docloader.fetch`                                   | Client      | Fetches a remote JSON-LD document.            |
| `http_signatures.sign`                              | Internal    | Signs the HTTP request.                       |
| `http_signatures.verify`                            | Internal    | Verifies the HTTP request signature.          |
| `ld_signatures.sign`                                | Internal    | Makes the Linked Data signature.              |
+2 −2
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ test("getDocumentLoader() records OpenTelemetry span", async (t) => {
      assertEquals(result.documentUrl, "https://example.com/doc");

      // Check that the span was recorded
      const spans = exporter.getSpans("docloader.fetch");
      const spans = exporter.getSpans("activitypub.fetch_document");
      assertEquals(spans.length, 1);
      const span = spans[0];

@@ -785,7 +785,7 @@ test("getDocumentLoader() records OpenTelemetry span", async (t) => {
      assertEquals(result.documentUrl, "https://example.com/new-doc");

      // Check that both spans were recorded (original + redirect)
      const spans = exporter.getSpans("docloader.fetch");
      const spans = exporter.getSpans("activitypub.fetch_document");
      assertEquals(spans.length, 2);

      // Check the redirect span (last span is the original request that redirected)
+1 −1
Original line number Diff line number Diff line
@@ -360,7 +360,7 @@ export function getDocumentLoader(
    }

    return await tracer.startActiveSpan(
      "docloader.fetch",
      "activitypub.fetch_document",
      {
        kind: SpanKind.CLIENT,
        attributes: {