Skip to content

feat: add cdk stats - #2131

Merged
Gauravudia merged 20 commits into
developfrom
feat/cdk-stats
May 26, 2023
Merged

Gauravudia merged 20 commits into
developfrom
feat/cdk-stats

Conversation

@Gauravudia

Copy link
Copy Markdown
Contributor

Description of the change

Adding CDK stats to filter if calls are going through CDK V2 or natively.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@Gauravudia Gauravudia self-assigned this May 8, 2023
@Gauravudia
Gauravudia requested a review from a team as a code owner May 8, 2023 04:34
@Gauravudia
Gauravudia requested a review from a team May 8, 2023 04:34
@codecov

codecov Bot commented May 8, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch and project coverage have no change.

Comparison is base (b077b05) 88.58% compared to head (292be70) 88.58%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2131   +/-   ##
========================================
  Coverage    88.58%   88.58%           
========================================
  Files          508      508           
  Lines        25712    25712           
  Branches      6353     6353           
========================================
  Hits         22776    22776           
  Misses        2622     2622           
  Partials       314      314           
Impacted Files Coverage Δ
src/util/prometheus.js 7.69% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sanpj2292

sanpj2292 commented May 8, 2023 •

Copy link
Copy Markdown

The changes seem fine to me. Just a slightly tangential approach to this
We can make the change at a slightly higher-level

The caller of these functions would have stat with all the necessary tags.
The stats name can be a little more generic like events_input or a better name but at the caller level we would know the implementation, feature details as well.
It would cover all features, implementations in a single-shot.

@sonarqubecloud

sonarqubecloud Bot commented May 8, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 177 Code Smells

86.8% 86.8% Coverage
4.4% 4.4% Duplication

Comment thread src/cdk/v2/handler.js Resolved
@Gauravudia Gauravudia removed their assignment May 9, 2023
@Gauravudia

Gauravudia commented May 9, 2023 •

Copy link
Copy Markdown
Contributor Author

The changes seem fine to me. Just a slightly tangential approach to this We can make the change at a slightly higher-level

The caller of these functions would have stat with all the necessary tags. The stats name can be a little more generic like events_input or a better name but at the caller level we would know the implementation, feature details as well. It would cover all features, implementations in a single-shot.

Added success/failed event stats at the caller function.

@Gauravudia Gauravudia self-assigned this May 10, 2023
koladilip
koladilip previously approved these changes May 10, 2023
@Gauravudia
Gauravudia requested review from koladilip and sanpj2292 May 23, 2023 10:00
koladilip
koladilip previously approved these changes May 23, 2023
@koladilip

koladilip commented May 23, 2023 •

Copy link
Copy Markdown
Contributor

did we test this locally? @Gauravudia

@sanpj2292

Copy link
Copy Markdown

The changes seem fine to me. Just a slightly tangential approach to this We can make the change at a slightly higher-level
The caller of these functions would have stat with all the necessary tags. The stats name can be a little more generic like events_input or a better name but at the caller level we would know the implementation, feature details as well. It would cover all features, implementations in a single-shot.

Added success/failed event stats at the caller function.

I would actually standardise this as following

stats.increment('event_transform_success', { ...tags, implementation: tags.IMPLEMENTATION.CDK_V2 }
...
stats.increment('event_transform_failure', { ...tags, implementation: tags.IMPLEMENTATION.CDK_V2 }

Now this same stat can be used for different implementations of transformation
But your current changes also looks good enough.

@Gauravudia

Copy link
Copy Markdown
Contributor Author

did we test this locally? @Gauravudia

Yes, added metrics are getting displayed on 9091/metrics

koladilip
koladilip previously approved these changes May 24, 2023
Comment thread src/util/prometheus.js Resolved
sanpj2292
sanpj2292 previously approved these changes May 25, 2023
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Gauravudia
Gauravudia merged commit 3fe837b into develop May 26, 2023
@devops-github-rudderstack
devops-github-rudderstack deleted the feat/cdk-stats branch August 27, 2023 01:24
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