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

[CLOUDGA-19629] Add support for telemetry provider #222

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Conversation

aquatiko
Copy link
Contributor

@aquatiko aquatiko commented Mar 13, 2024

Summary:
This change adds telemetry provider apis.
Almost everything is similar to metric export apis which is based on telemetry CRUD.
I've added IDs in all api outputs and introduced validate command. IDs are used in DB audit apis for specifying telemetry_provider to use.

Test Plan:

Added UTs for the change.

CLI operation logs:

[rkumar@dev-server-rkumar-31 ybm-cli]$ ./ybm integration create --config-name=dd --type=datadog --datadog-spec=site=datadoghq.com,api-key=f4XXXXXXXXXXXXXXXXXXXXXXXXXXXXbf
A newer version is available. Please upgrade to the latest version v0.1.18
The telemetry provider 51bf0334-4aef-430d-892c-aa840d00dc26 is being created
ID                                     Name      Type      Site            ApiKey
51bf0334-4aef-430d-892c-aa840d00dc26   dd        DATADOG   [datadoghq.com](http://datadoghq.com/)   f4XXXXXXXXXXXXXXXXXXXXXXXXXXXXbf


[rkumar@dev-server-rkumar-31 ybm-cli]$ ./ybm integration update --config-name=dd --new-config-name=ddog --type=datadog --datadogfspec=site=datadoghq.com,api-key=f4XXXXXXXXXXXXXXXXXXXXXXXXXXXXbf
A newer version is available. Please upgrade to the latest version v0.1.18
The telemetryProvider 51bf0334-4aef-430d-892c-aa840d00dc26 is being updated
ID                                     Name      Type      Site            ApiKey
51bf0334-4aef-430d-892c-aa840d00dc26   ddog      DATADOG   [datadoghq.com](http://datadoghq.com/)   f4XXXXXXXXXXXXXXXXXXXXXXXXXXXXbf

[rkumar@dev-server-rkumar-31 ybm-cli]$ ./ybm integration list
A newer version is available. Please upgrade to the latest version v0.1.18
ID                                     Name      Type
51bf0334-4aef-430d-892c-aa840d00dc26   ddog      DATADOG
2c21e4fd-a39c-4958-bfe6-80e727dc2820   ss        DATADOG


[rkumar@dev-server-rkumar-31 ybm-cli]$ ./ybm integration delete --config-name=ddog
A newer version is available. Please upgrade to the latest version v0.1.18
? Are you sure you want to delete config: ddog Yes
Deleting Telemetry Provider ddog


[rkumar@dev-server-rkumar-31 ybm-cli]$ ./ybm integration validate --config-name=dd --type=datadog --datadog-spec=site=datadoghq.com,api-key=f4XXXXXXXXXXXXXXXXXXXXXXXXXXXXbf
A newer version is available. Please upgrade to the latest version v0.1.18
Telemetry provider is valid

@aquatiko aquatiko marked this pull request as ready for review March 14, 2024 12:23
@aquatiko aquatiko requested a review from a team as a code owner March 14, 2024 12:23
cmd/telemetry_provider/telemetry_provider.go Outdated Show resolved Hide resolved
cmd/telemetry_provider/telemetry_provider.go Outdated Show resolved Hide resolved
cmd/telemetry_provider/telemetry_provider.go Outdated Show resolved Hide resolved
internal/client/client.go Outdated Show resolved Hide resolved
@aquatiko aquatiko requested a review from shinji62 March 18, 2024 05:23
Copy link

@jagdish-yb jagdish-yb left a comment

Choose a reason for hiding this comment

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

Please await code owners approval, thanks.

cmd/db_audit_logs_exporter/db_audit_logs_exporter.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@shinji62 shinji62 left a comment

Choose a reason for hiding this comment

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

Still have some reserve on the valid function, but nothing blocking

@aquatiko
Copy link
Contributor Author

aquatiko commented Mar 21, 2024

Still have some reserve on the valid function, but nothing blocking

I'll add a commit to remove the validate method and send a total of 2 commits in this PR, so that we can revert this commit if we want to add validate method

@aquatiko aquatiko merged commit 1a60fd2 into main Mar 21, 2024
2 checks passed
@aquatiko aquatiko deleted the CLOUDGA-19629 branch March 21, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants