Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra exporter implementation #18515

Merged
merged 37 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
178a109
cassandra exporter implementation
emreyalvac Feb 12, 2023
5aa4515
review
emreyalvac Feb 12, 2023
8926527
AsRaw used for logs
emreyalvac Feb 12, 2023
7b337a5
attributesToMap changed with string marshal
emreyalvac Feb 15, 2023
8f75f65
lint fix
emreyalvac Feb 15, 2023
e22a658
config unit test fixed
emreyalvac Feb 15, 2023
7a270c8
some config and unit tests edits
emreyalvac Apr 4, 2023
c923418
Merge branch 'cassandra-exporter' of https://github.com/emreyalvac/op…
emreyalvac Apr 4, 2023
67756a1
attributesToMap changed with string marshal
emreyalvac Feb 15, 2023
5e98c0e
config unit test fixed
emreyalvac Feb 15, 2023
068bb65
Merge branch 'cassandra-exporter' of https://github.com/emreyalvac/op…
emreyalvac Apr 4, 2023
5bb87ea
conflict
emreyalvac Apr 4, 2023
d542cf1
dependencies updated for exporter
emreyalvac Apr 4, 2023
b8193c4
Update exporter/cassandraexporter/helper.go
emreyalvac Apr 4, 2023
2097ef5
Update exporter/cassandraexporter/exporter_traces.go
emreyalvac Apr 4, 2023
7ccdc4b
Update exporter/cassandraexporter/exporter_logs.go
emreyalvac Apr 4, 2023
0be21a9
Update exporter/cassandraexporter/config.go
emreyalvac Apr 4, 2023
725898e
tidy
emreyalvac Apr 4, 2023
cb5bc05
import signature
emreyalvac Apr 4, 2023
d44b29f
multi err version
emreyalvac Apr 6, 2023
e59e897
tidy
emreyalvac Apr 6, 2023
fdd96b6
Merge branch 'main' into cassandra-exporter
emreyalvac Apr 6, 2023
9533fa8
lint fixes
emreyalvac Apr 6, 2023
478e080
lint fixes
emreyalvac Apr 6, 2023
abe5137
dependabot
emreyalvac Apr 6, 2023
0f6ca28
values added to yaml files for cassandra
emreyalvac Apr 6, 2023
e0c09db
defer order
emreyalvac Apr 7, 2023
edabba6
skipLifeCycle added for cassandra
emreyalvac Apr 13, 2023
49c602f
Merge branch 'main' into cassandra-exporter
emreyalvac Apr 13, 2023
4a960c2
tidy
emreyalvac Apr 13, 2023
5075c9a
dependabot
emreyalvac Apr 13, 2023
d45e99d
serviceName column removed because already in resourceattributes
emreyalvac Apr 14, 2023
0ac7d27
servicename removed from create table scripts
emreyalvac Apr 14, 2023
1ba228a
tidy
emreyalvac Apr 14, 2023
7590a01
Merge branch 'main' into cassandra-exporter
emreyalvac Apr 15, 2023
387f758
dependabot
emreyalvac Apr 15, 2023
873ea31
codeowner fixed
emreyalvac Apr 22, 2023
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
16 changes: 16 additions & 0 deletions .chloggen/cassandra-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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: cassandra_exporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Cassandra exporter implementation

# One or more tracking issues related to the change
issues: [17910]

# (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:
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ exporter/azuremonitorexporter/ @open-telemetry/collect
exporter/azuredataexplorerexporter/ @open-telemetry/collector-contrib-approvers @asaharan @ag-ramachandran
exporter/carbonexporter/ @open-telemetry/collector-contrib-approvers @pjanotti
exporter/clickhouseexporter/ @open-telemetry/collector-contrib-approvers @hanjm @dmitryax @Frapschen
exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @oded-dd @povilasv @matej-g
exporter/cassandraexporter/ @open-telemetry/collector-contrib-approvers @atoulme @emreyalvac
exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @oded-dd @ofirshmuel @povilasv @matej-g
emreyalvac marked this conversation as resolved.
Show resolved Hide resolved
exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @mx-psi @gbbr @dineshg13 @liustanley @songy23
exporter/dynatraceexporter/ @open-telemetry/collector-contrib-approvers @dyladan @arminru @evan-bradley
exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @JaredTan95
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ body:
- exporter/azuredataexplorer
- exporter/azuremonitor
- exporter/carbon
- exporter/cassandra
- exporter/clickhouse
- exporter/coralogix
- exporter/datadog
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
- exporter/azuredataexplorer
- exporter/azuremonitor
- exporter/carbon
- exporter/cassandra
- exporter/clickhouse
- exporter/coralogix
- exporter/datadog
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ body:
- exporter/azuredataexplorer
- exporter/azuremonitor
- exporter/carbon
- exporter/cassandra
- exporter/clickhouse
- exporter/coralogix
- exporter/datadog
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/exporter/cassandraexporter"
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/exporter/clickhouseexporter"
schedule:
Expand Down Expand Up @@ -1097,8 +1102,3 @@ updates:
schedule:
interval: "weekly"
day: "wednesday"
- package-ecosystem: "gomod"
directory: "/receiver/zipkinreceiver"
schedule:
interval: "weekly"
day: "wednesday"
5 changes: 5 additions & 0 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require (
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.1.4 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.1.4 // indirect
github.com/gocql/gocql v1.3.1 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.75.0 // indirect
Expand All @@ -29,6 +31,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.75.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.75.0 // indirect
Expand Down Expand Up @@ -698,6 +701,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbo

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter => ../../exporter/clickhouseexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter => ../../exporter/cassandraexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter => ../../exporter/coralogixexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter => ../../exporter/datadogexporter
Expand Down
5 changes: 5 additions & 0 deletions cmd/configschema/go.sum

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

2 changes: 2 additions & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.75.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.75.0
Expand Down Expand Up @@ -218,6 +219,7 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/skywalkingexporter => ../../exporter/skywalkingexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmoexporter => ../../exporter/mezmoexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter => ../../exporter/clickhouseexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter => ../../exporter/cassandraexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver => ../../receiver/udplogreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk => ../../internal/splunk
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver => ../../receiver/podmanreceiver
Expand Down
2 changes: 2 additions & 0 deletions cmd/otelcontribcol/components.go

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

9 changes: 9 additions & 0 deletions cmd/otelcontribcol/exporters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter"
Expand Down Expand Up @@ -307,6 +308,14 @@ func TestDefaultExporters(t *testing.T) {
},
skipLifecycle: true,
},
{
exporter: "cassandra",
getConfigFn: func() component.Config {
cfg := expFactories["cassandra"].CreateDefaultConfig().(*cassandraexporter.Config)
cfg.DSN = "127.0.0.1"
return cfg
},
},
{
exporter: "coralogix",
getConfigFn: func() component.Config {
Expand Down
5 changes: 5 additions & 0 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/coralogixexporter v0.75.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.75.0
Expand Down Expand Up @@ -355,6 +356,7 @@ require (
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gocql/gocql v1.3.1 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
Expand Down Expand Up @@ -386,6 +388,7 @@ require (
github.com/grobie/gomemcache v0.0.0-20180201122607-1f779c573665 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/consul/api v1.20.0 // indirect
github.com/hashicorp/cronexpr v1.1.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand Down Expand Up @@ -718,6 +721,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/mezmo

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickhouseexporter => ../../exporter/clickhouseexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter => ../../exporter/cassandraexporter

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver => ../../receiver/udplogreceiver

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk => ../../internal/splunk
Expand Down
5 changes: 5 additions & 0 deletions cmd/otelcontribcol/go.sum

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

1 change: 1 addition & 0 deletions exporter/cassandraexporter/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
34 changes: 34 additions & 0 deletions exporter/cassandraexporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Cassandra Exporter

| Status | |
|--------------------------|--------------|
| Stability | [alpha] |
| Supported pipeline types | logs, traces |
| Distributions | [contrib] |

## Configuration options

The following settings can be optionally configured:

- `dsn` The Cassandra server DSN (Data Source Name), for example `127.0.0.1`.
reference: [https://pkg.go.dev/github.com/gocql/gocql](https://pkg.go.dev/github.com/gocql/gocql)
- `keyspace` (default = otel): The keyspace name.
- `trace_table` (default = otel_spans): The table name for traces.
- `replication` (default = class: SimpleStrategy, replication_factor: 1) The strategy of
replication. https://cassandra.apache.org/doc/4.1/cassandra/architecture/dynamo.html#replication-strategy
- `compression` (default = LZ4Compressor) https://cassandra.apache.org/doc/latest/cassandra/operating/compression.html

## Example

```yaml
exporters:
cassandra:
dsn: 127.0.0.1
keyspace: "otel"
trace_table: "otel_spans"
replication:
class: "SimpleStrategy"
replication_factor: 1
compression:
algorithm: "ZstdCompressor"
```
Loading