From a633c9c3edc7b0075d6181dd53b187ff5dd9c820 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Wed, 31 Jul 2024 10:14:20 -0400 Subject: [PATCH 1/3] fix broken links Signed-off-by: Hannah Hunter --- .../building-blocks/jobs/jobs-overview.md | 2 +- .../en/operations/observability/metrics/metrics-overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/jobs/jobs-overview.md b/daprdocs/content/en/developing-applications/building-blocks/jobs/jobs-overview.md index b4d5214eb..24ebf808b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/jobs/jobs-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/jobs/jobs-overview.md @@ -32,7 +32,7 @@ The jobs API is a job scheduler, not the executor which runs the job. The design All job details and user-associated data for scheduled jobs are stored in an embedded Etcd database in the Scheduler service. You can use jobs to: -- **Delay your [pub/sub messaging]({<< ref pubsub-overview.md >>}).** You can publish a message in a future specific time (for example: a week from today, or a specific UTC date/time). +- **Delay your [pub/sub messaging]({{< ref pubsub-overview.md >}}).** You can publish a message in a future specific time (for example: a week from today, or a specific UTC date/time). - **Schedule [service invocation]({{< ref service-invocation-overview.md >}}) method calls between applications.** ## Scenarios diff --git a/daprdocs/content/en/operations/observability/metrics/metrics-overview.md b/daprdocs/content/en/operations/observability/metrics/metrics-overview.md index cc7e606d3..5f07bb325 100644 --- a/daprdocs/content/en/operations/observability/metrics/metrics-overview.md +++ b/daprdocs/content/en/operations/observability/metrics/metrics-overview.md @@ -74,7 +74,7 @@ spec: When invoking Dapr using HTTP, metrics are created for each requested method by default. This can result in a high number of metrics, known as high cardinality, which can impact memory usage and CPU. -Path matching allows you to manage and control the cardinality of HTTP metrics in Dapr. This is an aggregation of metrics, so rather than having a metric for each event, you can reduce the number of metrics events and report an overall number. For details on how to set the cardinality in configuration see ({{< ref "configuration-overview.md#metrics" >}}) +Path matching allows you to manage and control the cardinality of HTTP metrics in Dapr. This is an aggregation of metrics, so rather than having a metric for each event, you can reduce the number of metrics events and report an overall number. [Learn more about how to set the cardinality in configuration]({{< ref "configuration-overview.md#metrics" >}}). This configuration is opt-in and is enabled via the Dapr configuration `spec.metrics.http.pathMatching`. When defined, it enables path matching, which standardizes specified paths for both metrics paths. This reduces the number of unique metrics paths, making metrics more manageable and reducing resource consumption in a controlled way. From 8d7ff41381bd8dbb5a26e6b2ae52f52d1cbd1794 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Wed, 31 Jul 2024 10:25:12 -0400 Subject: [PATCH 2/3] remove GA features from preview table Signed-off-by: Hannah Hunter --- .../content/en/operations/support/support-preview-features.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/daprdocs/content/en/operations/support/support-preview-features.md b/daprdocs/content/en/operations/support/support-preview-features.md index 61701dec8..943b35d0e 100644 --- a/daprdocs/content/en/operations/support/support-preview-features.md +++ b/daprdocs/content/en/operations/support/support-preview-features.md @@ -19,9 +19,7 @@ For CLI there is no explicit opt-in, just the version that this was first made a | **Multi-App Run for Kubernetes** | Configure multiple Dapr applications from a single configuration file and run from a single command on Kubernetes | `dapr run -k -f` | [Multi-App Run]({{< ref multi-app-dapr-run.md >}}) | v1.12 | | **Workflows** | Author workflows as code to automate and orchestrate tasks within your application, like messaging, state management, and failure handling | N/A | [Workflows concept]({{< ref "components-concept#workflows" >}})| v1.10 | | **Cryptography** | Encrypt or decrypt data without having to manage secrets keys | N/A | [Cryptography concept]({{< ref "components-concept#cryptography" >}})| v1.11 | -| **Service invocation for non-Dapr endpoints** | Allow the invocation of non-Dapr endpoints by Dapr using the [Service invocation API]({{< ref service_invocation_api.md >}}). Read ["How-To: Invoke Non-Dapr Endpoints using HTTP"]({{< ref howto-invoke-non-dapr-endpoints.md >}}) for more information. | N/A | [Service invocation API]({{< ref service_invocation_api.md >}}) | v1.11 | | **Actor State TTL** | Allow actors to save records to state stores with Time To Live (TTL) set to automatically clean up old data. In its current implementation, actor state with TTL may not be reflected correctly by clients, read [Actor State Transactions]({{< ref actors_api.md >}}) for more information. | `ActorStateTTL` | [Actor State Transactions]({{< ref actors_api.md >}}) | v1.11 | -| **Transactional Outbox** | Allows state operations for inserts and updates to be published to a configured pub/sub topic using a single transaction across the state store and the pub/sub | N/A | [Transactional Outbox Feature]({{< ref howto-outbox.md >}}) | v1.12 | | **Component Hot Reloading** | Allows for Dapr-loaded components to be "hot reloaded". A component spec is reloaded when it is created/updated/deleted in Kubernetes or on file when running in self-hosted mode. Ignores changes to actor state stores and workflow backends. | `HotReload`| [Hot Reloading]({{< ref components-concept.md >}}) | v1.13 | | **Subscription Hot Reloading** | Allows for declarative subscriptions to be "hot reloaded". A subscription is reloaded either when it is created/updated/deleted in Kubernetes, or on file in self-hosted mode. In-flight messages are unaffected when reloading. | `HotReload`| [Hot Reloading]({{< ref "subscription-methods.md#declarative-subscriptions" >}}) | v1.14 | | **Job actor reminders** | Whilst the [Scheduler service]({{< ref "concepts/dapr-services/scheduler.md" >}}) is deployed by default, job actor reminders (used for scheduling actor reminders) are enabled through a preview feature and needs a feature flag. | `SchedulerReminders`| [Job actor reminders]({{< ref "jobs-overview.md#actor-reminders" >}}) | v1.14 | From 7e4b80185bac534b3921f54b5565ad7fa2403348 Mon Sep 17 00:00:00 2001 From: Yaron Schneider Date: Wed, 31 Jul 2024 08:42:50 -0700 Subject: [PATCH 3/3] Fix outbox projection http json (#4286) * fix outbox projection http json Signed-off-by: yaron2 * update outbox projection text Signed-off-by: yaron2 * Update daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md Signed-off-by: Mark Fussell --------- Signed-off-by: yaron2 Signed-off-by: Mark Fussell Co-authored-by: Mark Fussell --- .../state-management/howto-outbox.md | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md index a2facf91b..40261a1af 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-outbox.md @@ -110,11 +110,11 @@ spec: ### Shape the outbox pattern message -You can override the outbox pattern message published to the pub/sub broker by setting a different message. This is done via a projected transaction payload, called `outboxProjections`, which is ignored when the state is written and is used as the outbox pattern message published to the user topic. +You can override the outbox pattern message published to the pub/sub broker by setting another transaction that is not be saved to the database and is explicitly mentioned as a projection. This transaction is added a metadata key named `outbox.projection` with a value set to `true`. When added to the state array saved in a transaction, this payload is ignored when the state is written and the data is used as the payload sent to the upstream subscriber. -To set the `outboxProjections` to `true`, the `key` values must match between the operation on the state store and the message projection. If the keys do not match, the whole transaction fails. +To use correctly, the `key` values must match between the operation on the state store and the message projection. If the keys do not match, the whole transaction fails. -If you have two or more `outboxProjections` for the same key, the first one defined is used and the others are ignored. +If you have two or more `outbox.projection` enabled state items for the same key, the first one defined is used and the others are ignored. [Learn more about default and custom CloudEvent messages.]({{< ref pubsub-cloudevents.md >}}) @@ -368,26 +368,33 @@ You can pass the message override using the following HTTP request: curl -X POST http://localhost:3500/v1.0/state/starwars/transaction \ -H "Content-Type: application/json" \ -d '{ - "operations": [ - { - "operation": "upsert", - "request": { - "key": "key1", - "value": "2" - } - }, - { - "operation": "upsert", - "request": { - "key": "key1" - "value: "3" - "metadata": { - "outboxProjection": "true" - } - } - } - ], - }' + "operations": [ + { + "operation": "upsert", + "request": { + "key": "order1", + "value": { + "orderId": "7hf8374s", + "type": "book", + "name": "The name of the wind" + } + } + }, + { + "operation": "upsert", + "request": { + "key": "order1", + "value": { + "orderId": "7hf8374s" + }, + "metadata": { + "outbox.projection": "true" + }, + "contentType": "application/json" + } + } + ] +}' ``` By setting the metadata item `"outbox.projection"` to `"true"` and making sure the `key` values match (`key1`):