Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions javascript/sentry-conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@ The package exports:

- `attributes`: contains constants for all attribute names and their types, as defined in the Sentry semantic conventions
- `attributes.Attributes`: represents a bag of typed attributes
- `attributes/documentation`: contains descriptions, examples, additional context, and changelogs
- `op`: contains constants for span operations used in Sentry

Runtime metadata and documentation are separate:

```ts
import { ATTRIBUTE_METADATA } from '@sentry/conventions/attributes';
import { ATTRIBUTE_DOCUMENTATION, BROWSER_NAME_BRIEF } from '@sentry/conventions/attributes/documentation';
```

Prefer an individual brief export when only a few descriptions are needed so bundlers can remove the rest.
2 changes: 1 addition & 1 deletion javascript/sentry-conventions/build.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineBuildConfig } from 'unbuild';

export default defineBuildConfig({
entries: ['./src/index', './src/attributes', './src/op'],
entries: ['./src/index', './src/attributes', './src/attributeDocumentation', './src/op'],
outDir: 'dist',
declaration: 'compatible',
sourcemap: true,
Expand Down
4 changes: 4 additions & 0 deletions javascript/sentry-conventions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"import": "./dist/attributes.mjs",
"require": "./dist/attributes.cjs"
},
"./attributes/documentation": {
"import": "./dist/attributeDocumentation.mjs",
"require": "./dist/attributeDocumentation.cjs"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing legacy documentation export shims

Low Severity

The new @sentry/conventions/attributes/documentation export is only wired through package.json exports, with no root compatibility shims like attributes and op already have. Tooling that ignores exports (for example webpack 4 or older TypeScript) cannot resolve the documented import path.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e8f9572. Configure here.

"./op": {
"import": "./dist/op.mjs",
"require": "./dist/op.cjs"
Expand Down
6,866 changes: 6,866 additions & 0 deletions javascript/sentry-conventions/src/attributeDocumentation.ts

Large diffs are not rendered by default.

Loading
Loading