Skip to content

Commit 4547e9d

Browse files
committed
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.
1 parent 8f47dd8 commit 4547e9d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To be released.
3030
- Added OpenTelemetry spans for previously uninstrumented operations:
3131
[[#323]]
3232

33-
- Added `docloader.fetch` span for document loader operations,
33+
- Added `activitypub.fetch_document` span for document loader operations,
3434
tracking URL fetching, HTTP redirects, and final document URLs.
3535
- Added `activitypub.verify_key_ownership` span for cryptographic
3636
key ownership verification, recording actor ID, key ID, verification

docs/manual/opentelemetry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ spans:
174174
| `activitypub.outbox` | Consumer | Dequeues the ActivityPub activity to send. |
175175
| `activitypub.outbox` | Producer | Enqueues the ActivityPub activity to send. |
176176
| `activitypub.parse_object` | Internal | Parses the Activity Streams object. |
177+
| `activitypub.fetch_document` | Client | Fetches a remote JSON-LD document. |
177178
| `activitypub.send_activity` | Client | Sends the ActivityPub activity. |
178179
| `activitypub.verify_key_ownership` | Internal | Verifies actor ownership of a key. |
179-
| `docloader.fetch` | Client | Fetches a remote JSON-LD document. |
180180
| `http_signatures.sign` | Internal | Signs the HTTP request. |
181181
| `http_signatures.verify` | Internal | Verifies the HTTP request signature. |
182182
| `ld_signatures.sign` | Internal | Makes the Linked Data signature. |

packages/fedify/src/runtime/docloader.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ test("getDocumentLoader() records OpenTelemetry span", async (t) => {
742742
assertEquals(result.documentUrl, "https://example.com/doc");
743743

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

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

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

791791
// Check the redirect span (last span is the original request that redirected)

packages/fedify/src/runtime/docloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export function getDocumentLoader(
360360
}
361361

362362
return await tracer.startActiveSpan(
363-
"docloader.fetch",
363+
"activitypub.fetch_document",
364364
{
365365
kind: SpanKind.CLIENT,
366366
attributes: {

0 commit comments

Comments
 (0)