Skip to content

Conversation

@MSNev
Copy link
Collaborator

@MSNev MSNev commented Feb 7, 2026

Major refactoring of the OpenTelemetry core module to synchronise the changes from [Beta] branch this includes improved tree-shaking support, simplify API interfaces, and enhance span lifecycle management.

Tracing API changes:

  • Refactored createOTelApi to use simplified configuration through host context
  • Added new createTraceProvider and _createTracerProvider for proper tracer caching
  • Introduced withSpan, useSpan, and startActiveSpan helpers for automatic span lifecycle management
  • Added onException callback support to span context
  • Added suppressTracing configuration support for disabling trace recording
  • Updated createContext to require IOTelApi parameter for context binding

Span improvements:

  • Added traceContext, attribContainer, and events properties to readable spans
  • Fixed span recording state to respect suppressTracing configuration
  • Added prototype naming via setProtoTypeName for better debugging visibility
  • Changed from createDeferredCachedValue to getDeferred for lazy evaluation

Tree-shaking optimizations:

  • Added /#NO_SIDE_EFFECTS/ annotations throughout utility functions
  • Converted telemetry class static properties to use external constants (DataTypes.ts, EnvelopeTypes.ts)
  • Marked deprecated instance properties with @deprecated notices
  • Added caching to EnvUtils functions to avoid repeated evaluations
  • Removed unused classes: Data.ts, RemoteDependencyData.ts

New semantic conventions:

  • Added SemanticConventions.ts with OTel attribute constants for Microsoft/Application Insights

Consolidated utilities:

  • Merged HelperFuncsCore.ts into HelperFuncs.ts
  • Added msToTimeSpan, isTimeSpan, getExtensionByName, isCrossOriginError helpers
  • Moved createDistributedTraceContextFromTrace to Util.ts with deprecation notice

otel-noop package updates:

  • Reorganized noop logger/processor implementations
  • Added promise-returning noop helpers
  • Updated test files and converted to ES5 target
  • Updated dependencies: @nevware21/ts-utils >=0.12.6, @nevware21/ts-async >=0.5.5

Build configuration:

  • Re-enabled es5Check in shims rollup config
  • Removed obsolete package entries from version.json

MSNev added 2 commits February 6, 2026 17:37
…g and span context improvements

Major refactoring of the OpenTelemetry core module to synchronise the changes from [Beta] branch this includes improved tree-shaking support, simplify API interfaces, and enhance span lifecycle management.

Tracing API changes:
- Refactored createOTelApi to use simplified configuration through host context
- Added new createTraceProvider and _createTracerProvider for proper tracer caching
- Introduced withSpan, useSpan, and startActiveSpan helpers for automatic span lifecycle management
- Added onException callback support to span context
- Added suppressTracing configuration support for disabling trace recording
- Updated createContext to require IOTelApi parameter for context binding

Span improvements:
- Added traceContext, attribContainer, and events properties to readable spans
- Fixed span recording state to respect suppressTracing configuration
- Added prototype naming via setProtoTypeName for better debugging visibility
- Changed from createDeferredCachedValue to getDeferred for lazy evaluation

Tree-shaking optimizations:
- Added /*#__NO_SIDE_EFFECTS__*/ annotations throughout utility functions
- Converted telemetry class static properties to use external constants (DataTypes.ts, EnvelopeTypes.ts)
- Marked deprecated instance properties with @deprecated notices
- Added caching to EnvUtils functions to avoid repeated evaluations
- Removed unused classes: Data.ts, RemoteDependencyData.ts

New semantic conventions:
- Added SemanticConventions.ts with OTel attribute constants for Microsoft/Application Insights

Consolidated utilities:
- Merged HelperFuncsCore.ts into HelperFuncs.ts
- Added msToTimeSpan, isTimeSpan, getExtensionByName, isCrossOriginError helpers
- Moved createDistributedTraceContextFromTrace to Util.ts with deprecation notice

otel-noop package updates:
- Reorganized noop logger/processor implementations
- Added promise-returning noop helpers
- Updated test files and converted to ES5 target
- Updated dependencies: @nevware21/ts-utils >=0.12.6, @nevware21/ts-async >=0.5.5

Build configuration:
- Re-enabled es5Check in shims rollup config
- Removed obsolete package entries from version.json
@MSNev MSNev requested a review from a team as a code owner February 7, 2026 02:39
Copilot AI review requested due to automatic review settings February 7, 2026 02:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@MSNev MSNev merged commit 76d0a7a into otel-sdk Feb 10, 2026
9 checks passed
@MSNev MSNev deleted the MSNev/OTelSync branch February 10, 2026 21: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