Loading docs/manual/opentelemetry.md +16 −15 Original line number Diff line number Diff line Loading @@ -118,9 +118,10 @@ Fedify automatically instruments the following operations with OpenTelemetry spans: | Span name | [Span kind] | Description | |----------------------------------|-------------|---------------------------------------| |----------------------------------------|-------------|---------------------------------------------| | `{method} {template}` | Server | Serves the incoming HTTP request. | | `activitypub.dispatch_actor` | Server | Dispatches the ActivityPub actor. | | `activitypub.dispatch_actor_key_pairs` | Server | Dispatches the ActivityPub actor key pairs. | | `activitypub.get_actor_handle` | Client | Resolves the actor handle. | | `activitypub.lookup_object` | Client | Looks up the Activity Streams object. | | `activitypub.parse_object` | Internal | Parses the Activity Streams object. | Loading src/federation/middleware.ts +21 −2 Original line number Diff line number Diff line Loading @@ -1062,8 +1062,27 @@ export class FederationImpl<TContextData> implements Federation<TContextData> { }; this.actorCallbacks = callbacks; const setters: ActorCallbackSetters<TContextData> = { setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>) { callbacks.keyPairsDispatcher = dispatcher; setKeyPairsDispatcher: ( dispatcher: ActorKeyPairsDispatcher<TContextData>, ) => { callbacks.keyPairsDispatcher = (ctx, identifier) => this.#getTracer().startActiveSpan( "activitypub.dispatch_actor_key_pairs", { kind: SpanKind.SERVER }, async (span) => { try { return await dispatcher(ctx, identifier); } catch (e) { span.setStatus({ code: SpanStatusCode.ERROR, message: String(e), }); throw e; } finally { span.end(); } }, ); return setters; }, mapHandle(mapper: ActorHandleMapper<TContextData>) { Loading Loading
docs/manual/opentelemetry.md +16 −15 Original line number Diff line number Diff line Loading @@ -118,9 +118,10 @@ Fedify automatically instruments the following operations with OpenTelemetry spans: | Span name | [Span kind] | Description | |----------------------------------|-------------|---------------------------------------| |----------------------------------------|-------------|---------------------------------------------| | `{method} {template}` | Server | Serves the incoming HTTP request. | | `activitypub.dispatch_actor` | Server | Dispatches the ActivityPub actor. | | `activitypub.dispatch_actor_key_pairs` | Server | Dispatches the ActivityPub actor key pairs. | | `activitypub.get_actor_handle` | Client | Resolves the actor handle. | | `activitypub.lookup_object` | Client | Looks up the Activity Streams object. | | `activitypub.parse_object` | Internal | Parses the Activity Streams object. | Loading
src/federation/middleware.ts +21 −2 Original line number Diff line number Diff line Loading @@ -1062,8 +1062,27 @@ export class FederationImpl<TContextData> implements Federation<TContextData> { }; this.actorCallbacks = callbacks; const setters: ActorCallbackSetters<TContextData> = { setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>) { callbacks.keyPairsDispatcher = dispatcher; setKeyPairsDispatcher: ( dispatcher: ActorKeyPairsDispatcher<TContextData>, ) => { callbacks.keyPairsDispatcher = (ctx, identifier) => this.#getTracer().startActiveSpan( "activitypub.dispatch_actor_key_pairs", { kind: SpanKind.SERVER }, async (span) => { try { return await dispatcher(ctx, identifier); } catch (e) { span.setStatus({ code: SpanStatusCode.ERROR, message: String(e), }); throw e; } finally { span.end(); } }, ); return setters; }, mapHandle(mapper: ActorHandleMapper<TContextData>) { Loading