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

[jaeger-v2] Align Cassandra Storage Config With OTEL #5949

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

mahadzaryab1
Copy link
Contributor

@mahadzaryab1 mahadzaryab1 commented Sep 6, 2024

Which problem is this PR solving?

Description of the changes

  • Revamped configuration for Cassandra to be logically grouped
  • Added unit tests for the Validate method
  • Changed the configuration to use OTEL's configtls.ClientConfig type
  • Migration guide

How was this change tested?

  • New unit tests
  • CI

Checklist

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 92.70833% with 7 lines in your changes missing coverage. Please review.

Project coverage is 96.84%. Comparing base (7787010) to head (0c3ddcb).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cassandra/config/config.go 88.13% 3 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5949      +/-   ##
==========================================
+ Coverage   96.82%   96.84%   +0.01%     
==========================================
  Files         345      345              
  Lines       16523    16524       +1     
==========================================
+ Hits        15998    16002       +4     
+ Misses        339      335       -4     
- Partials      186      187       +1     
Flag Coverage Δ
badger_v1 8.02% <0.00%> (-0.01%) ⬇️
badger_v2 1.82% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 15.83% <90.62%> (-0.78%) ⬇️
cassandra-4.x-v2 1.75% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1 15.83% <90.62%> (-0.78%) ⬇️
cassandra-5.x-v2 1.75% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.78% <0.00%> (-0.01%) ⬇️
elasticsearch-7.x-v1 18.83% <0.00%> (-0.01%) ⬇️
elasticsearch-8.x-v1 19.03% <0.00%> (-0.01%) ⬇️
elasticsearch-8.x-v2 1.81% <0.00%> (-0.02%) ⬇️
grpc_v1 9.52% <0.00%> (+0.01%) ⬆️
grpc_v2 7.15% <0.00%> (+0.01%) ⬆️
kafka-v1 9.74% <0.00%> (-0.01%) ⬇️
kafka-v2 1.82% <0.00%> (-0.01%) ⬇️
memory_v2 1.81% <0.00%> (-0.02%) ⬇️
opensearch-1.x-v1 18.88% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v1 18.89% <0.00%> (-0.01%) ⬇️
opensearch-2.x-v2 1.82% <0.00%> (+0.01%) ⬆️
tailsampling-processor 0.46% <0.00%> (-0.01%) ⬇️
unittests 95.28% <38.54%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Authenticator Authenticator `mapstructure:",squash"`
DisableAutoDiscovery bool `mapstructure:"-"`
TLS tlscfg.Options `mapstructure:"tls"`
Servers []string `valid:"required,url" mapstructure:"servers"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move valid to the right of mapstructure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Keyspace string `mapstructure:"keyspace"`
LocalDC string `mapstructure:"local_dc"`
ConnectionsPerHost int `mapstructure:"connections_per_host"`
Timeout time.Duration `mapstructure:"-"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a mapstructure name. Also needs a better name - which timeout is it?

Copy link
Contributor Author

@mahadzaryab1 mahadzaryab1 Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the query timeout - added the tag as well

cmd/jaeger/config-cassandra.yaml Show resolved Hide resolved
ConnectionsPerHost int `mapstructure:"connections_per_host"`
ReconnectInterval time.Duration `mapstructure:"reconnect_interval"`
SocketKeepAlive time.Duration `mapstructure:"socket_keep_alive"`
MaxRetryAttempts int `mapstructure:"max_retry_attempts"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for query? If yes I would prefix as such.

ConnectTimeout time.Duration `mapstructure:"connection_timeout"`
Authenticator Authenticator `mapstructure:"auth"`
ProtoVersion int `mapstructure:"proto_version"`
Consistency string `mapstructure:"consistency"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm starting to think you may want to partition these further into connection and query - it seems the fields are pretty separate for those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a separate grouping for query. Should Consistency be under Query as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so - it's passed as part of queries, not as connection parameter, is it not?

Signed-off-by: Mahad Zaryab <[email protected]>
@mahadzaryab1
Copy link
Contributor Author

Is NamespaceConfig still relevant (https://github.com/jaegertracing/jaeger/blob/main/plugin/storage/cassandra/options.go#L70-L74)? Or can we replace it with the Configuration type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jaeger-v2] Align Cassandra Storage Config With OTEL
2 participants