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

feat: enhance telemetry capabilities #5979

Merged
merged 1 commit into from
Feb 27, 2025
Merged

feat: enhance telemetry capabilities #5979

merged 1 commit into from
Feb 27, 2025

Conversation

kandl
Copy link
Contributor

@kandl kandl commented Feb 26, 2025

Add withCorrelation method to sdk-backend-spi that enables attaching custom metadata to backend requests.

In the sdk-backend-tiger implementation,
it's provided as an x-gdc-correlation header,
with stringified correlation metadata as its value.

This enhancement enables more detailed telemetry tracking, allowing inclusion of contextual information in requests such as visualization IDs, dashboard IDs, and more.

Introduce a new CorrelationContext React context that provides a convenient way to set and retrieve
backend correlation metadata.

Integrate with Dashboard - enhance all requests with dashboardId, and further enrich visualization-related requests with widgetId and visualizationId.

risk: low
JIRA: STL-1062


Important

Please, don't forget to run rush change for the commits that introduce new features or significant changes 🙏 This information is used to generate the change log.


Run extended test by pull request comment

Commands can be triggered by posting a comment with specific text on the pull request. It is possible to trigger multiple commands simultaneously.

extended-test --backstop | --integrated | --isolated | --record [--filter <file1>,<file2>,...,<fileN>]

Explanation

  • --backstop The command to run screen tests.
  • --integrated The command to run integrated tests against the live backend.
  • --isolated The command to run isolated tests against recordings.
  • --record The command to create new recordings for isolated tests.
  • --filter (Optional) A comma-separated list of test files to run. This parameter is valid only for the --integrated, --isolated, and --record commands.

Examples

extended-test --backstop
extended-test --integrated
extended-test --integrated --filter test1.spec.ts,test2.spec.ts
extended-test --isolated
extended-test --isolated --filter test1.spec.ts,test2.spec.ts
extended-test --record
extended-test --record --filter test1.spec.ts,test2.spec.ts

@kandl kandl added the ready to review PR is ready to final code review label Feb 26, 2025
};
}

const effectiveBackend = useBackendWithCorrelation(backend, correlationData);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious why we are calling useBackendWithCorrelation twice with the same correlationData?
I mean why just not

return useBackendWithCorrelation(backend, correlationData);

Add `withCorrelation` method to sdk-backend-spi that enables
attaching custom metadata to backend requests.

In the sdk-backend-tiger implementation,
it's provided as an `x-gdc-correlation` header,
with stringified correlation metadata as its value.

This enhancement enables more detailed telemetry tracking,
allowing inclusion of contextual information in requests such as
visualization IDs, dashboard IDs, and more.

Introduce a new `CorrelationContext` React context that
provides a convenient way to set and retrieve
backend correlation metadata.

Integrate with Dashboard - enhance all requests with dashboardId,
and further enrich visualization-related requests with widgetId
and visualizationId.

Integrate with InsightView - enhance all requests with visualizationId.

Also integrate with BaseVisualization.

risk: low
JIRA: STL-1062
@pbenes pbenes enabled auto-merge February 27, 2025 10:06
@pbenes pbenes merged commit 5242f8f into master Feb 27, 2025
15 checks passed
@pbenes pbenes deleted the mkn-stl-1062 branch February 27, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to review PR is ready to final code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants