diff --git a/.chloggen/redis-storage.yaml b/.chloggen/redis-storage.yaml new file mode 100644 index 000000000000..f8de43df09a5 --- /dev/null +++ b/.chloggen/redis-storage.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: redis_storage + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adds a new storage extension using Redis to store data in transit + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [31682] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1e231d0c7584..868d7b3950bf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -119,6 +119,7 @@ extension/solarwindsapmsettingsextension/ @open-teleme extension/storage/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme @djaglowski extension/storage/dbstorage/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme extension/storage/filestorage/ @open-telemetry/collector-contrib-approvers @djaglowski +extension/storage/redisstorageextension/ @open-telemetry/collector-contrib-approvers @atoulme extension/sumologicextension/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo @kkujawa-sumo @mat-rumian @rnishtala-sumo @sumo-drosiek internal/aws/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @mxiamxia diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 2fb804a0d806..f598d533b7f6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -117,6 +117,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/storage/redisstorage - extension/sumologic - internal/aws - internal/collectd diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index d15af6e51d5f..260c716e448f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -111,6 +111,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/storage/redisstorage - extension/sumologic - internal/aws - internal/collectd diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 0a0833055cbb..6516b7e79143 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -111,6 +111,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/storage/redisstorage - extension/sumologic - internal/aws - internal/collectd diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 5b29c2b79c08..6c7163309790 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -116,6 +116,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/storage/redisstorage - extension/sumologic - internal/aws - internal/collectd diff --git a/extension/storage/redisstorageextension/Makefile b/extension/storage/redisstorageextension/Makefile new file mode 100644 index 000000000000..bdd863a203be --- /dev/null +++ b/extension/storage/redisstorageextension/Makefile @@ -0,0 +1 @@ +include ../../../Makefile.Common diff --git a/extension/storage/redisstorageextension/README.md b/extension/storage/redisstorageextension/README.md new file mode 100644 index 000000000000..b07d9bf52b5c --- /dev/null +++ b/extension/storage/redisstorageextension/README.md @@ -0,0 +1,48 @@ +# File Storage + + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fredisstorage%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fredisstorage) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fredisstorage%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fredisstorage) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme) \| Seeking more code owners! | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + + +The Redis Storage extension can persist state to a Redis cluster. + +The extension requires read and write access to a Redis cluster. + +## Config +- `endpoint` (required): The endpoint of the redis instance to connect to. Default: `localhost:6379` +- `password` (optional): the password to connect to the redis instance. Default: `` +- `db` (optional): Database to be selected after connecting to the server. Default: 0 +- `expiration` (optional): TTL for all storage entries. Default TTL means the key has no expiration time. Default: 0 + +## Example + +``` +extensions: + redis_storage: + redis_storage/all_settings: + endpoint: localhost:6379 + password: "" + db: 0 + expiration: 5m + +service: + extensions: [redis_storage, redis_storage/all_settings] + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] + +# Data pipeline is required to load the config. +receivers: + nop: +exporters: + nop: +``` diff --git a/extension/storage/redisstorageextension/config.go b/extension/storage/redisstorageextension/config.go new file mode 100644 index 000000000000..34257ddcc3c3 --- /dev/null +++ b/extension/storage/redisstorageextension/config.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension" + +import ( + "time" + + "go.opentelemetry.io/collector/config/configopaque" +) + +// Config defines configuration for the Redis storage extension. +type Config struct { + Endpoint string `mapstructure:"endpoint"` + Password configopaque.String `mapstructure:"password"` + DB int `mapstructure:"db"` + Expiration time.Duration `mapstructure:"expiration"` +} diff --git a/extension/storage/redisstorageextension/config_test.go b/extension/storage/redisstorageextension/config_test.go new file mode 100644 index 000000000000..6ea05a88535c --- /dev/null +++ b/extension/storage/redisstorageextension/config_test.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap/confmaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + + tests := []struct { + id component.ID + expected component.Config + }{ + { + id: component.NewID(metadata.Type), + expected: func() component.Config { + ret := NewFactory().CreateDefaultConfig() + ret.(*Config).Endpoint = "localhost:1234" + return ret + }(), + }, + { + id: component.NewIDWithName(metadata.Type, "all_settings"), + expected: &Config{ + Endpoint: "localhost:1234", + Password: "passwd", + DB: 1, + Expiration: 3 * time.Hour, + }, + }, + } + for _, tt := range tests { + t.Run(tt.id.String(), func(t *testing.T) { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub(tt.id.String()) + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} diff --git a/extension/storage/redisstorageextension/doc.go b/extension/storage/redisstorageextension/doc.go new file mode 100644 index 000000000000..d5e64941ee7f --- /dev/null +++ b/extension/storage/redisstorageextension/doc.go @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml +package redisstorageextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension" diff --git a/extension/storage/redisstorageextension/extension.go b/extension/storage/redisstorageextension/extension.go new file mode 100644 index 000000000000..660ea3c418e4 --- /dev/null +++ b/extension/storage/redisstorageextension/extension.go @@ -0,0 +1,131 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension" + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/redis/go-redis/v9" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.opentelemetry.io/collector/extension/experimental/storage" + "go.uber.org/zap" +) + +type redisStorage struct { + cfg *Config + logger *zap.Logger + client *redis.Client +} + +// Ensure this storage extension implements the appropriate interface +var _ storage.Extension = (*redisStorage)(nil) + +func newRedisStorage(logger *zap.Logger, config *Config) (extension.Extension, error) { + return &redisStorage{ + cfg: config, + logger: logger, + }, nil +} + +// Start runs cleanup if configured +func (rs *redisStorage) Start(context.Context, component.Host) error { + c := redis.NewClient(&redis.Options{ + Addr: rs.cfg.Endpoint, + Password: string(rs.cfg.Password), + DB: rs.cfg.DB, + }) + rs.client = c + return nil +} + +// Shutdown will close any open databases +func (rs *redisStorage) Shutdown(context.Context) error { + if rs.client == nil { + return nil + } + return rs.client.Close() +} + +type redisClient struct { + client *redis.Client + prefix string + expiration time.Duration +} + +var _ storage.Client = redisClient{} + +func (rc redisClient) Get(ctx context.Context, key string) ([]byte, error) { + b, err := rc.client.Get(ctx, rc.prefix+key).Bytes() + if errors.Is(err, redis.Nil) { + return nil, nil + } + return b, err +} + +func (rc redisClient) Set(ctx context.Context, key string, value []byte) error { + _, err := rc.client.Set(ctx, rc.prefix+key, value, rc.expiration).Result() + return err +} + +func (rc redisClient) Delete(ctx context.Context, key string) error { + _, err := rc.client.Del(ctx, rc.prefix+key).Result() + return err +} + +func (rc redisClient) Batch(ctx context.Context, ops ...storage.Operation) error { + p := rc.client.Pipeline() + for _, op := range ops { + switch op.Type { + case storage.Delete: + p.Del(ctx, op.Key) + case storage.Get: + p.Get(ctx, op.Key) + case storage.Set: + p.Set(ctx, op.Key, op.Value, rc.expiration) + } + } + _, err := p.Exec(ctx) + return err +} + +func (rc redisClient) Close(_ context.Context) error { + return nil +} + +// GetClient returns a storage client for an individual component +func (rs *redisStorage) GetClient(_ context.Context, kind component.Kind, ent component.ID, name string) (storage.Client, error) { + var rawName string + if name == "" { + rawName = fmt.Sprintf("%s_%s_%s", kindString(kind), ent.Type(), ent.Name()) + } else { + rawName = fmt.Sprintf("%s_%s_%s_%s", kindString(kind), ent.Type(), ent.Name(), name) + } + + return redisClient{ + client: rs.client, + prefix: rawName, + expiration: rs.cfg.Expiration, + }, nil +} + +func kindString(k component.Kind) string { + switch k { + case component.KindReceiver: + return "receiver" + case component.KindProcessor: + return "processor" + case component.KindExporter: + return "exporter" + case component.KindExtension: + return "extension" + case component.KindConnector: + return "connector" + default: + return "other" // not expected + } +} diff --git a/extension/storage/redisstorageextension/extension_test.go b/extension/storage/redisstorageextension/extension_test.go new file mode 100644 index 000000000000..6bc3bef61008 --- /dev/null +++ b/extension/storage/redisstorageextension/extension_test.go @@ -0,0 +1,205 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension + +import ( + "context" + "sync" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/experimental/storage" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestExtensionIntegrity(t *testing.T) { + t.Skip("Requires a Redis cluster to be present at localhost:6379") + ctx := context.Background() + se := newTestExtension(t) + + type mockComponent struct { + kind component.Kind + name component.ID + } + + components := []mockComponent{ + {kind: component.KindReceiver, name: newTestEntity("receiver_one")}, + {kind: component.KindReceiver, name: newTestEntity("receiver_two")}, + {kind: component.KindProcessor, name: newTestEntity("processor_one")}, + {kind: component.KindProcessor, name: newTestEntity("processor_two")}, + {kind: component.KindExporter, name: newTestEntity("exporter_one")}, + {kind: component.KindExporter, name: newTestEntity("exporter_two")}, + {kind: component.KindExtension, name: newTestEntity("extension_one")}, + {kind: component.KindExtension, name: newTestEntity("extension_two")}, + } + + // Make a client for each component + clients := make(map[component.ID]storage.Client) + for _, c := range components { + client, err := se.GetClient(ctx, c.kind, c.name, "") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client.Close(ctx)) + }) + + clients[c.name] = client + } + + thrashClient := func(wg *sync.WaitGroup, n component.ID, c storage.Client) { + // keys and values + keys := []string{"a", "b", "c", "d", "e"} + myBytes := []byte(n.Name()) + + // Set my values + for i := 0; i < len(keys); i++ { + err := c.Set(ctx, keys[i], myBytes) + require.NoError(t, err) + } + + // Repeatedly thrash client + for j := 0; j < 100; j++ { + + // Make sure my values are still mine + for i := 0; i < len(keys); i++ { + v, err := c.Get(ctx, keys[i]) + require.NoError(t, err) + require.Equal(t, myBytes, v) + } + + // Delete my values + for i := 0; i < len(keys); i++ { + err := c.Delete(ctx, keys[i]) + require.NoError(t, err) + } + + // Reset my values + for i := 0; i < len(keys); i++ { + err := c.Set(ctx, keys[i], myBytes) + require.NoError(t, err) + } + } + wg.Done() + } + + // Use clients concurrently + var wg sync.WaitGroup + for name, client := range clients { + wg.Add(1) + go thrashClient(&wg, name, client) + } + wg.Wait() +} + +func TestClientHandlesSimpleCases(t *testing.T) { + t.Skip("Requires a Redis cluster to be present at localhost:6379") + ctx := context.Background() + se := newTestExtension(t) + + client, err := se.GetClient( + ctx, + component.KindReceiver, + newTestEntity("my_component"), + "", + ) + + myBytes := []byte("value") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client.Close(ctx)) + }) + + // Set the data + err = client.Set(ctx, "key", myBytes) + require.NoError(t, err) + + // Set it again (nop does not error) + err = client.Set(ctx, "key", myBytes) + require.NoError(t, err) + + // Get actual data + data, err := client.Get(ctx, "key") + require.NoError(t, err) + require.Equal(t, myBytes, data) + + // Delete the data + err = client.Delete(ctx, "key") + require.NoError(t, err) + + // Delete it again (nop does not error) + err = client.Delete(ctx, "key") + require.NoError(t, err) + + // Get missing data + data, err = client.Get(ctx, "key") + require.NoError(t, err) + require.Nil(t, data) + +} + +func TestTwoClientsWithDifferentNames(t *testing.T) { + t.Skip("Requires a Redis cluster to be present at localhost:6379") + ctx := context.Background() + se := newTestExtension(t) + + client1, err := se.GetClient( + ctx, + component.KindReceiver, + newTestEntity("my_component"), + "foo", + ) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client1.Close(ctx)) + }) + + client2, err := se.GetClient( + ctx, + component.KindReceiver, + newTestEntity("my_component"), + "bar", + ) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client2.Close(ctx)) + }) + + myBytes1 := []byte("value1") + myBytes2 := []byte("value2") + + // Set the data + err = client1.Set(ctx, "key", myBytes1) + require.NoError(t, err) + + err = client2.Set(ctx, "key", myBytes2) + require.NoError(t, err) + + // Check it was associated accordingly + data, err := client1.Get(ctx, "key") + require.NoError(t, err) + require.Equal(t, myBytes1, data) + + data, err = client2.Get(ctx, "key") + require.NoError(t, err) + require.Equal(t, myBytes2, data) +} + +func newTestExtension(t *testing.T) storage.Extension { + f := NewFactory() + cfg := f.CreateDefaultConfig().(*Config) + + extension, err := f.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + + se, ok := extension.(storage.Extension) + require.True(t, ok) + require.NoError(t, se.Start(context.Background(), componenttest.NewNopHost())) + + return se +} + +func newTestEntity(name string) component.ID { + return component.MustNewIDWithName("nop", name) +} diff --git a/extension/storage/redisstorageextension/factory.go b/extension/storage/redisstorageextension/factory.go new file mode 100644 index 000000000000..9e8f685f6392 --- /dev/null +++ b/extension/storage/redisstorageextension/factory.go @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension/internal/metadata" +) + +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + Endpoint: "localhost:6379", + } +} + +func createExtension( + _ context.Context, + params extension.Settings, + cfg component.Config, +) (extension.Extension, error) { + return newRedisStorage(params.Logger, cfg.(*Config)) +} diff --git a/extension/storage/redisstorageextension/factory_test.go b/extension/storage/redisstorageextension/factory_test.go new file mode 100644 index 000000000000..3991743ff0ed --- /dev/null +++ b/extension/storage/redisstorageextension/factory_test.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package redisstorageextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestFactory(t *testing.T) { + f := NewFactory() + + tests := []struct { + name string + config *Config + }{ + { + name: "Default", + config: func() *Config { + return &Config{ + Endpoint: "localhost:6379", + } + }(), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + e, err := f.CreateExtension( + context.Background(), + extensiontest.NewNopSettings(), + test.config, + ) + require.NoError(t, err) + require.NotNil(t, e) + ctx := context.Background() + require.NoError(t, e.Start(ctx, componenttest.NewNopHost())) + require.NoError(t, e.Shutdown(ctx)) + }) + } +} diff --git a/extension/storage/redisstorageextension/generated_component_test.go b/extension/storage/redisstorageextension/generated_component_test.go new file mode 100644 index 000000000000..c49f68f6fff4 --- /dev/null +++ b/extension/storage/redisstorageextension/generated_component_test.go @@ -0,0 +1,49 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package redisstorageextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "redis_storage", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, secondExt.Shutdown(context.Background())) + }) +} diff --git a/extension/storage/redisstorageextension/generated_package_test.go b/extension/storage/redisstorageextension/generated_package_test.go new file mode 100644 index 000000000000..5378f0ceecbe --- /dev/null +++ b/extension/storage/redisstorageextension/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package redisstorageextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/storage/redisstorageextension/go.mod b/extension/storage/redisstorageextension/go.mod new file mode 100644 index 000000000000..3b5b4164d283 --- /dev/null +++ b/extension/storage/redisstorageextension/go.mod @@ -0,0 +1,56 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension + +go 1.21.0 + +require ( + github.com/redis/go-redis/v9 v9.5.1 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.105.1-0.20240717163034-43ed6184f9fe + go.opentelemetry.io/collector/config/configopaque v1.12.1-0.20240716231837-5753a58f712b + go.opentelemetry.io/collector/confmap v0.105.1-0.20240717163034-43ed6184f9fe + go.opentelemetry.io/collector/extension v0.105.1-0.20240717163034-43ed6184f9fe + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.105.1-0.20240717163034-43ed6184f9fe // indirect + go.opentelemetry.io/collector/featuregate v1.12.1-0.20240716231837-5753a58f712b // indirect + go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata v1.12.1-0.20240716231837-5753a58f712b // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/storage/redisstorageextension/go.sum b/extension/storage/redisstorageextension/go.sum new file mode 100644 index 000000000000..e8d279bce84b --- /dev/null +++ b/extension/storage/redisstorageextension/go.sum @@ -0,0 +1,139 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8= +github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector/component v0.105.1-0.20240717163034-43ed6184f9fe h1:arQYi6m+phRUEW9nFRYcDv05oSNtrl3C6CrGej+5AsY= +go.opentelemetry.io/collector/component v0.105.1-0.20240717163034-43ed6184f9fe/go.mod h1:s8KoxOrhNIBzetkb0LHmzX1OI67DyZbaaUPOWIXS1mg= +go.opentelemetry.io/collector/config/configopaque v1.12.1-0.20240716231837-5753a58f712b h1:iF2pDHhOTS9ZOJSTt5OtAVgxumEU1bap77qjtV+Gz6s= +go.opentelemetry.io/collector/config/configopaque v1.12.1-0.20240716231837-5753a58f712b/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= +go.opentelemetry.io/collector/config/configtelemetry v0.105.1-0.20240717163034-43ed6184f9fe h1:PZBUpzjgEarO4SPyO2ZZFJqe9U6gcXCDB1hC8RdKwpE= +go.opentelemetry.io/collector/config/configtelemetry v0.105.1-0.20240717163034-43ed6184f9fe/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/confmap v0.105.1-0.20240717163034-43ed6184f9fe h1:Bg7JwoNUEyqtC76+z1eMllfkh2ulwRdh7DEOrQVz5kw= +go.opentelemetry.io/collector/confmap v0.105.1-0.20240717163034-43ed6184f9fe/go.mod h1:Oj1xUBRvAuL8OWWMj9sSYf1uQpB+AErpj+FKGUQLBI0= +go.opentelemetry.io/collector/extension v0.105.1-0.20240717163034-43ed6184f9fe h1:Zdzo5Q7AkzfoHVLq1VE0yHBgLzbFua01x7SjtSwfInI= +go.opentelemetry.io/collector/extension v0.105.1-0.20240717163034-43ed6184f9fe/go.mod h1:oyX960URG27esNKitf3o2rqcBj0ajcx+dxkCxwRz34U= +go.opentelemetry.io/collector/featuregate v1.12.1-0.20240716231837-5753a58f712b h1:rH/3mvRHmDdcKtDPZvoFLrIl8317HSHfb0AykJ6bjM8= +go.opentelemetry.io/collector/featuregate v1.12.1-0.20240716231837-5753a58f712b/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/internal/globalgates v0.105.0 h1:U/CwnTUXtrblD1sZ6ri7KWfYoTNjQd7GjJKrX/phRik= +go.opentelemetry.io/collector/internal/globalgates v0.105.0/go.mod h1:Z5US6O2xkZAtxVSSBnHAPFZwPhFoxlyKLUvS67Vx4gc= +go.opentelemetry.io/collector/pdata v1.12.1-0.20240716231837-5753a58f712b h1:rrdMHqJ6DCZmPSeQal3cHCDsmgmGt6mClFm5kuXOIME= +go.opentelemetry.io/collector/pdata v1.12.1-0.20240716231837-5753a58f712b/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/extension/storage/redisstorageextension/internal/metadata/generated_status.go b/extension/storage/redisstorageextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..74d3e57f6a75 --- /dev/null +++ b/extension/storage/redisstorageextension/internal/metadata/generated_status.go @@ -0,0 +1,15 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("redis_storage") +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) diff --git a/extension/storage/redisstorageextension/metadata.yaml b/extension/storage/redisstorageextension/metadata.yaml new file mode 100644 index 000000000000..ac41d96b4a17 --- /dev/null +++ b/extension/storage/redisstorageextension/metadata.yaml @@ -0,0 +1,10 @@ +type: redis_storage + +status: + class: extension + stability: + development: [extension] + distributions: [] + codeowners: + active: [atoulme] + seeking_new: true diff --git a/extension/storage/redisstorageextension/testdata/config.yaml b/extension/storage/redisstorageextension/testdata/config.yaml new file mode 100644 index 000000000000..3bbbbcecc8cf --- /dev/null +++ b/extension/storage/redisstorageextension/testdata/config.yaml @@ -0,0 +1,7 @@ +redis_storage: + endpoint: localhost:1234 +redis_storage/all_settings: + endpoint: localhost:1234 + password: passwd + db: 1 + expiration: 3h diff --git a/versions.yaml b/versions.yaml index 30ee09b2f42e..1f6d1fc058f8 100644 --- a/versions.yaml +++ b/versions.yaml @@ -106,6 +106,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/redisstorageextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight