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

Move common @sentry/tracing code to @sentry/core #7091

Closed
Tracked by #5815
timfish opened this issue Feb 8, 2023 · 3 comments · Fixed by #7339
Closed
Tracked by #5815

Move common @sentry/tracing code to @sentry/core #7091

timfish opened this issue Feb 8, 2023 · 3 comments · Fixed by #7339
Assignees
Labels
Package: core Issues related to the Sentry Core SDK Type: Improvement

Comments

@timfish
Copy link
Collaborator

timfish commented Feb 8, 2023

Problem Statement

To work towards #5886 and #5815, common tracing code should be moved to @sentry/core.

Solution Brainstorm

Initially this should be done in a way that results in no breaking changes by re-exporting the types moved to core from tracing.

@timfish
Copy link
Collaborator Author

timfish commented Feb 8, 2023

I'm working on a PR for this but there are a couple of minor issues still to resolve:

  • Any types added to core conflict in nextjs/src/index.types.ts

export * from './server';
export * from './edge';

  • @sentry/tracing tests use private exports

To ensure there are no breaking changes, @sentry/tracing tests should stay with that package for now, however the tests use private exports like import { _addTracingExtensions } from '../src/hubextensions';

@timfish timfish self-assigned this Feb 8, 2023
@AbhiPrasad
Copy link
Member

@sentry/tracing tests use private exports

We can change the exports here?

@timfish
Copy link
Collaborator Author

timfish commented Feb 8, 2023

We can change the exports here?

We could but they'll become part of the public API of @sentry/core which I guess is not desirable. Some of them are just constants used for testing.

We could import them directly from core:

import { _addTracingExtensions } from '../../../../core/src/tracing/hubextensions';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: core Issues related to the Sentry Core SDK Type: Improvement
Projects
None yet
2 participants