Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,43 @@ To be released.
and delayed counts, and `ParallelMessageQueue` delegates depth reporting
to its wrapped queue when supported. [[#735], [#748]]

- Added OpenTelemetry metrics for ActivityPub delivery attempts, permanent
delivery failures, inbox listener processing duration, and HTTP Signature
verification failures. Applications can pass the new `meterProvider`
option to `createFederation()`, and `Context.meterProvider` exposes the
provider available to request, inbox, and outbox code.
[[#316], [#619], [#755]]

- Added the `activitypub.delivery.failed` span event to queued outbox
delivery spans so retry and permanent-failure decisions include the
remote host, attempt number, and HTTP status code when available.
[[#316], [#619], [#755]]

- *Breaking change*: Changed the `activitypub.activity.sent` span event to
record delivery metadata (`activitypub.inbox.url` and
`activitypub.activity.id`) instead of the full `activitypub.activity.json`
payload. `FedifySpanExporter` now stores outbound records from those
attributes, and `TraceActivityRecord.activityJson` is present only when the
span event includes full activity JSON. [[#316], [#619], [#755]]

[#316]: https://github.com/fedify-dev/fedify/issues/316
[#619]: https://github.com/fedify-dev/fedify/issues/619
[#735]: https://github.com/fedify-dev/fedify/issues/735
[#748]: https://github.com/fedify-dev/fedify/pull/748
[#752]: https://github.com/fedify-dev/fedify/issues/752
[#753]: https://github.com/fedify-dev/fedify/pull/753
[#755]: https://github.com/fedify-dev/fedify/pull/755

### @fedify/fixture

- Added `createTestMeterProvider()` and `TestMetricRecorder` helpers for
asserting OpenTelemetry metric measurements in runtime-agnostic tests.
[[#316], [#619], [#755]]

### @fedify/testing

- Added a `meterProvider` option to `createFederation()` so mock contexts can
expose a test OpenTelemetry meter provider. [[#316], [#619], [#755]]

### @fedify/amqp

Expand Down
1 change: 1 addition & 0 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
"@opentelemetry/context-async-hooks": "npm:@opentelemetry/context-async-hooks@^2.5.0",
"@opentelemetry/core": "npm:@opentelemetry/core@^2.5.0",
"@opentelemetry/sdk-metrics": "npm:@opentelemetry/sdk-metrics@2.5.0",
"@opentelemetry/sdk-trace-base": "npm:@opentelemetry/sdk-trace-base@^2.5.0",
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.39.0",
"@optique/config": "jsr:@optique/config@^1.0.2",
Expand Down
40 changes: 36 additions & 4 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/manual/federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,18 @@ For more information, see the [*OpenTelemetry* section](./opentelemetry.md).

[`trace.getTracerProvider()`]: https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api._opentelemetry_api.TraceAPI.html#gettracerprovider

### `meterProvider`

*This API is available since Fedify 2.3.0.*

The OpenTelemetry meter provider that the `Federation` object uses to record
Fedify metrics. If omitted, it is configured to use the default meter provider
(i.e., [`metrics.getMeterProvider()`]).

For more information, see the [*OpenTelemetry* section](./opentelemetry.md).

[`metrics.getMeterProvider()`]: https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api._opentelemetry_api.MetricsAPI.html#getmeterprovider


Builder pattern for structuring
-------------------------------
Expand Down
Loading