Skip to content

Commit 5717fbb

Browse files
[CI] Release Package (#54)
* ci: release package * docs: update example to remove deprecated header * docs: regenerate api reference --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ivan Porto <iporto@adobe.com>
1 parent d52c544 commit 5717fbb

37 files changed

+452
-247
lines changed

.changeset/cool-rockets-attack.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/olive-boats-do.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/quick-buckets-start.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @adobe/aio-lib-telemetry
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- [#53](https://github.com/adobe/aio-lib-telemetry/pull/53) [`da43624`](https://github.com/adobe/aio-lib-telemetry/commit/da43624af232c1ac9031ac88493037b9dede969e) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Add support for an `integrations` feature to easily integrate with external systems that require a specific configuration. Introduces a `commerceEvents` and a `commerceWebhooks` integrations that are available from `@adobe/aio-lib-telemetry/integrations` which can be used to automatically configure context propagation for requests or events coming from [Adobe Commerce Webhooks](https://developer-stage.adobe.com/commerce/extensibility/webhooks/) or [Adobe Commerce Events](https://developer-stage.adobe.com/commerce/extensibility/events/).
8+
9+
- [#47](https://github.com/adobe/aio-lib-telemetry/pull/47) [`6fb3032`](https://github.com/adobe/aio-lib-telemetry/commit/6fb30324206200bd72ef8a99d78f7c02c90e8864) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Automatically mark root spans with an error status if they return a response that matches an unsuccessful response shape (according to [App Builder documentation](https://developer.adobe.com/app-builder/docs/guides/runtime_guides/creating-actions#unsuccessful-response))
10+
11+
- [#53](https://github.com/adobe/aio-lib-telemetry/pull/53) [`da43624`](https://github.com/adobe/aio-lib-telemetry/commit/da43624af232c1ac9031ac88493037b9dede969e) Thanks [@iivvaannxx](https://github.com/iivvaannxx)! - Deprecate custom `x-telemetry-context` header. From now on, if invoking via HTTP requests, propagated context doesn't need to be nested inside that header. Following the W3C Trace Propagation spec, you can send the `traceparent` (and related) headers as normal headers. They will be picked from `__ow_headers` instead. **Note that this only applies for runtime actions invoked via HTTP requests**. When invoked via events you should still use the special `__telemetryContext` variables or specify yourself where to find the context carrier.
12+
313
## 1.0.0
414

515
### Major Changes

docs/api-reference/README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -71,41 +71,43 @@ import {
7171

7272
## Interfaces
7373

74-
| Interface | Description |
75-
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
76-
| [EntrypointInstrumentationConfig](interfaces/EntrypointInstrumentationConfig.md) | The configuration for entrypoint instrumentation. |
77-
| [InstrumentationConfig](interfaces/InstrumentationConfig.md) | The configuration for instrumentation. |
78-
| [InstrumentationContext](interfaces/InstrumentationContext.md) | The context for the current operation. |
79-
| [TelemetryApi](interfaces/TelemetryApi.md) | Defines the global telemetry API. These items should be set once per application. |
80-
| [TelemetryConfig](interfaces/TelemetryConfig.md) | The configuration options for the telemetry module. |
81-
| [TelemetryDiagnosticsConfig](interfaces/TelemetryDiagnosticsConfig.md) | The configuration for the telemetry diagnostics. |
82-
| [TelemetryPropagationConfig](interfaces/TelemetryPropagationConfig.md) | Configuration related to context propagation (for distributed tracing). |
74+
| Interface | Description |
75+
| -------------------------------------------------------------------------------- | --------------------------------------------------- |
76+
| [EntrypointInstrumentationConfig](interfaces/EntrypointInstrumentationConfig.md) | The configuration for entrypoint instrumentation. |
77+
| [TelemetryConfig](interfaces/TelemetryConfig.md) | The configuration options for the telemetry module. |
8378

8479
## Type Aliases
8580

86-
| Type Alias | Description |
87-
| -------------------------------------------------------------------------------- | -------------------------------------------------------- |
88-
| [DiagnosticsLogLevel](type-aliases/DiagnosticsLogLevel.md) | Available log levels for the OpenTelemetry `DiagLogger`. |
89-
| [TelemetryInstrumentationPreset](type-aliases/TelemetryInstrumentationPreset.md) | Defines the names of available instrumentation presets. |
81+
| Type Alias | Description |
82+
| -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
83+
| [DiagnosticsLogLevel](type-aliases/DiagnosticsLogLevel.md) | Available log levels for the OpenTelemetry `DiagLogger`. |
84+
| [EntrypointFunction](type-aliases/EntrypointFunction.md) | The shape of the entrypoint function. |
85+
| [InstrumentationConfig](type-aliases/InstrumentationConfig.md) | The configuration for instrumentation. |
86+
| [InstrumentationContext](type-aliases/InstrumentationContext.md) | The context for the current operation. |
87+
| [TelemetryApi](type-aliases/TelemetryApi.md) | Defines the global telemetry API. These items should be set once per application. |
88+
| [TelemetryDiagnosticsConfig](type-aliases/TelemetryDiagnosticsConfig.md) | The configuration for the telemetry diagnostics. |
89+
| [TelemetryInstrumentationPreset](type-aliases/TelemetryInstrumentationPreset.md) | Defines the names of available instrumentation presets. |
90+
| [TelemetryIntegration](type-aliases/TelemetryIntegration.md) | A telemetry integration. |
91+
| [TelemetryPropagationConfig](type-aliases/TelemetryPropagationConfig.md) | Configuration related to context propagation (for distributed tracing). |
9092

9193
## Functions
9294

93-
| Function | Description |
94-
| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95-
| [addEventToActiveSpan](functions/addEventToActiveSpan.md) | Adds an event to the given span. |
96-
| [defineMetrics](functions/defineMetrics.md) | Helper to define a record of metrics. |
97-
| [defineTelemetryConfig](functions/defineTelemetryConfig.md) | Helper to define the telemetry configuration for an entrypoint. |
98-
| [deserializeContextFromCarrier](functions/deserializeContextFromCarrier.md) | Deserializes the context from a carrier and augments the given base context with it. |
99-
| [getActiveSpan](functions/getActiveSpan.md) | Gets the active span from the given context. |
100-
| [getAioRuntimeAttributes](functions/getAioRuntimeAttributes.md) | Infers some useful attributes for the current action from the Adobe I/O Runtime and returns them as a record of key-value pairs. |
101-
| [getAioRuntimeResource](functions/getAioRuntimeResource.md) | Creates a [resource](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk-node.resources.Resource.html) from the attributes inferred from the Adobe I/O Runtime and returns it as an OpenTelemetry Resource object. |
102-
| [getAioRuntimeResourceWithAttributes](functions/getAioRuntimeResourceWithAttributes.md) | Creates a [resource](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_sdk-node.resources.Resource.html) that combines the attributes inferred from the Adobe I/O Runtime with the provided attributes. |
103-
| [getGlobalTelemetryApi](functions/getGlobalTelemetryApi.md) | Gets the global telemetry API. |
104-
| [getInstrumentationHelpers](functions/getInstrumentationHelpers.md) | Access helpers for the current instrumented operation. |
105-
| [getLogger](functions/getLogger.md) | Gets a logger instance that can export OpenTelemetry logs. |
106-
| [getPresetInstrumentations](functions/getPresetInstrumentations.md) | Gets the instrumentations for a given preset. |
107-
| [instrument](functions/instrument.md) | Instruments a function. |
108-
| [instrumentEntrypoint](functions/instrumentEntrypoint.md) | Instruments the entrypoint of a runtime action. Needs to be used ONLY with the `main` function of a runtime action. |
109-
| [serializeContextIntoCarrier](functions/serializeContextIntoCarrier.md) | Serializes the current context into a carrier. |
110-
| [tryAddEventToActiveSpan](functions/tryAddEventToActiveSpan.md) | Tries to add an event to the active span. |
111-
| [tryGetActiveSpan](functions/tryGetActiveSpan.md) | Tries to get the active span from the given context. |
95+
| Function | Description |
96+
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
97+
| [addEventToActiveSpan](functions/addEventToActiveSpan.md) | Adds an event to the given span. |
98+
| [defineMetrics](functions/defineMetrics.md) | Helper to define a record of metrics. |
99+
| [defineTelemetryConfig](functions/defineTelemetryConfig.md) | Helper to define the telemetry configuration for an entrypoint. |
100+
| [deserializeContextFromCarrier](functions/deserializeContextFromCarrier.md) | Deserializes the context from a carrier and augments the given base context with it. |
101+
| [getActiveSpan](functions/getActiveSpan.md) | Gets the active span from the given context. |
102+
| [getAioRuntimeAttributes](functions/getAioRuntimeAttributes.md) | biome-ignore-all lint/performance/noBarrelFile: This is the import entrypoint for the public API. |
103+
| [getAioRuntimeResource](functions/getAioRuntimeResource.md) | biome-ignore-all lint/performance/noBarrelFile: This is the import entrypoint for the public API. |
104+
| [getAioRuntimeResourceWithAttributes](functions/getAioRuntimeResourceWithAttributes.md) | biome-ignore-all lint/performance/noBarrelFile: This is the import entrypoint for the public API. |
105+
| [getGlobalTelemetryApi](functions/getGlobalTelemetryApi.md) | Gets the global telemetry API. |
106+
| [getInstrumentationHelpers](functions/getInstrumentationHelpers.md) | Access helpers for the current instrumented operation. |
107+
| [getLogger](functions/getLogger.md) | Gets a logger instance that can export OpenTelemetry logs. |
108+
| [getPresetInstrumentations](functions/getPresetInstrumentations.md) | Gets the instrumentations for a given preset. |
109+
| [instrument](functions/instrument.md) | Instruments a function. |
110+
| [instrumentEntrypoint](functions/instrumentEntrypoint.md) | Instruments the entrypoint of a runtime action. Needs to be used ONLY with the `main` function of a runtime action. |
111+
| [serializeContextIntoCarrier](functions/serializeContextIntoCarrier.md) | Serializes the current context into a carrier. |
112+
| [tryAddEventToActiveSpan](functions/tryAddEventToActiveSpan.md) | Tries to add an event to the active span. |
113+
| [tryGetActiveSpan](functions/tryGetActiveSpan.md) | Tries to get the active span from the given context. |

docs/api-reference/functions/addEventToActiveSpan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
function addEventToActiveSpan(event: string, attributes?: Attributes): void;
55
```
66

7-
Defined in: [api/global.ts:72](https://github.com/adobe/aio-lib-telemetry/blob/8f52cfa8868b711535e2b8726ef8da98982edbdf/source/api/global.ts#L72)
7+
Defined in: [api/global.ts:72](https://github.com/adobe/aio-lib-telemetry/blob/559503f2d0d79c50f3f552437165225cc1007a4f/source/api/global.ts#L72)
88

99
Adds an event to the given span.
1010

docs/api-reference/functions/defineMetrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
function defineMetrics<T>(createMetrics: (meter: Meter) => T): T;
55
```
66

7-
Defined in: [core/metrics.ts:52](https://github.com/adobe/aio-lib-telemetry/blob/8f52cfa8868b711535e2b8726ef8da98982edbdf/source/core/metrics.ts#L52)
7+
Defined in: [core/metrics.ts:52](https://github.com/adobe/aio-lib-telemetry/blob/559503f2d0d79c50f3f552437165225cc1007a4f/source/core/metrics.ts#L52)
88

99
Helper to define a record of metrics.
1010

docs/api-reference/functions/defineTelemetryConfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function defineTelemetryConfig(
1414
};
1515
```
1616

17-
Defined in: [core/config.ts:21](https://github.com/adobe/aio-lib-telemetry/blob/8f52cfa8868b711535e2b8726ef8da98982edbdf/source/core/config.ts#L21)
17+
Defined in: [core/config.ts:21](https://github.com/adobe/aio-lib-telemetry/blob/559503f2d0d79c50f3f552437165225cc1007a4f/source/core/config.ts#L21)
1818

1919
Helper to define the telemetry configuration for an entrypoint.
2020

docs/api-reference/functions/deserializeContextFromCarrier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function deserializeContextFromCarrier<Carrier>(
77
): Context;
88
```
99

10-
Defined in: [api/propagation.ts:59](https://github.com/adobe/aio-lib-telemetry/blob/8f52cfa8868b711535e2b8726ef8da98982edbdf/source/api/propagation.ts#L59)
10+
Defined in: [api/propagation.ts:61](https://github.com/adobe/aio-lib-telemetry/blob/559503f2d0d79c50f3f552437165225cc1007a4f/source/api/propagation.ts#L61)
1111

1212
Deserializes the context from a carrier and augments the given base context with it.
1313

0 commit comments

Comments
 (0)