From 866bc45d1cd18635efd6309080bda3f4f8c2faac Mon Sep 17 00:00:00 2001 From: Robert Lankford Date: Mon, 11 Dec 2023 03:02:07 -0800 Subject: [PATCH] otelcol.connector.servicegraph: update default store ttl value (#5941) * otelcol.connector.servicegraph: update default store ttl value Signed-off-by: Robbie Lankford * update test --------- Signed-off-by: Robbie Lankford --- CHANGELOG.md | 2 ++ component/otelcol/connector/servicegraph/servicegraph.go | 2 +- component/otelcol/connector/servicegraph/servicegraph_test.go | 2 +- .../reference/components/otelcol.connector.servicegraph.md | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10c06f93e465..eb9024692b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,8 @@ Main (unreleased) - Fixes `loki.source.docker` a behavior that synced an incomplete list of targets to the tailer manager. (@FerdinandvHagen) +- Fixes `otelcol.connector.servicegraph` store ttl default value from 2ms to 2s. (@rlankfo) + ### Other changes - Bump github.com/IBM/sarama from v1.41.2 to v1.42.1 diff --git a/component/otelcol/connector/servicegraph/servicegraph.go b/component/otelcol/connector/servicegraph/servicegraph.go index e5370d89f620..c1713cca5ad5 100644 --- a/component/otelcol/connector/servicegraph/servicegraph.go +++ b/component/otelcol/connector/servicegraph/servicegraph.go @@ -91,7 +91,7 @@ var DefaultArguments = Arguments{ Dimensions: []string{}, Store: StoreConfig{ MaxItems: 1000, - TTL: 2 * time.Millisecond, + TTL: 2 * time.Second, }, CacheLoop: 1 * time.Minute, StoreExpirationLoop: 2 * time.Second, diff --git a/component/otelcol/connector/servicegraph/servicegraph_test.go b/component/otelcol/connector/servicegraph/servicegraph_test.go index 5f7204b2bb6b..952ac8fc06d5 100644 --- a/component/otelcol/connector/servicegraph/servicegraph_test.go +++ b/component/otelcol/connector/servicegraph/servicegraph_test.go @@ -44,7 +44,7 @@ func TestArguments_UnmarshalRiver(t *testing.T) { Dimensions: []string{}, Store: servicegraphprocessor.StoreConfig{ MaxItems: 1000, - TTL: 2 * time.Millisecond, + TTL: 2 * time.Second, }, CacheLoop: 1 * time.Minute, StoreExpirationLoop: 2 * time.Second, diff --git a/docs/sources/flow/reference/components/otelcol.connector.servicegraph.md b/docs/sources/flow/reference/components/otelcol.connector.servicegraph.md index e7aad20d8e29..ab3e55b5521f 100644 --- a/docs/sources/flow/reference/components/otelcol.connector.servicegraph.md +++ b/docs/sources/flow/reference/components/otelcol.connector.servicegraph.md @@ -135,7 +135,7 @@ The `store` block configures the in-memory store for spans. Name | Type | Description | Default | Required ---- | ---- | ----------- | ------- | -------- `max_items` | `number` | Maximum number of items to keep in the store. | `1000` | no -`ttl` | `duration` | The time to live for spans in the store. | `"2ms"` | no +`ttl` | `duration` | The time to live for spans in the store. | `"2s"` | no ### output block @@ -238,4 +238,4 @@ connection work correctly. Refer to the linked documentation for more details. {{% /admonition %}} - \ No newline at end of file +