Skip to content

docs: add dedicated session management guide#343

Open
Adii-45 wants to merge 2 commits into
open-telemetry:mainfrom
Adii-45:docs/session-management-guide
Open

docs: add dedicated session management guide#343
Adii-45 wants to merge 2 commits into
open-telemetry:mainfrom
Adii-45:docs/session-management-guide

Conversation

@Adii-45

@Adii-45 Adii-45 commented Jul 9, 2026

Copy link
Copy Markdown

Which problem is this PR solving?

Closes #114

This PR adds dedicated documentation for browser session management to improve discoverability and provide a more comprehensive reference than the existing SDK README!

Previously, session management was only documented as a brief section inside packages/sdk/README.md, making it difficult for users to understand the available APIs, lifecycle, configuration options, extension points, and implementation details!

Short description of the changes

Added

  • A new docs/session-management.md guide covering:
    • Session overview
    • Quick start
    • Session lifecycle
    • SessionManager configuration
    • Built-in implementations
    • Registering session processors
    • Observing session lifecycle
    • Custom SessionStore implementations
    • Custom SessionProvider implementations
    • Known limitations
    • Related references

Updated

  • Simplified the Sessions section in packages/sdk/README.md by keeping it focused on quick-start usage and linking to the new dedicated guide for detailed documentation.
  • Added a new Documentation section to the repository README.md linking to:
    • Session Management
    • Browser Events
    • Navigation Event

This keeps detailed documentation centralized under the docs/ directory while preserving a concise onboarding experience in the SDK README.

Type of change

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

How Has This Been Tested?

  • Verified all Markdown links resolve correctly
  • Reviewed the documentation for accuracy against the current implementation
  • Confirmed no runtime code or public APIs were modified
  • Ran the existing test suite (npm test) to ensure no regressions

Checklist

  • I followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@Adii-45
Adii-45 requested a review from a team as a code owner July 9, 2026 05:48
@Adii-45
Adii-45 force-pushed the docs/session-management-guide branch from dc4f479 to e343a2c Compare July 9, 2026 05:49
Comment thread docs/session-management.md
Comment thread docs/session-management.md
Comment thread docs/session-management.md Outdated
Comment thread docs/session-management.md Outdated
Comment thread docs/session-management.md Outdated
await sessionManager.start();

startBrowserSdk({
serviceName: 'my-service',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When we pass our own processors here but no exportConfig, the SDK does not add an OTLP exporter (the check in startTracesSdk.ts and startLogsSdk.ts is !config.processors || config.exportConfig). So this Quick Start sets session.id on spans and logs but never exports them. @martinkuba what do you think?

Suggested change
serviceName: 'my-service',
serviceName: 'my-service',
exportConfig: { url: 'https://your-collector.example.com' },

@Adii-45
Adii-45 force-pushed the docs/session-management-guide branch from 3cedeb6 to b10a26a Compare July 13, 2026 04:10
@Adii-45

Adii-45 commented Jul 13, 2026

Copy link
Copy Markdown
Author

@overbalance Just a small bump on this 😄

I've addressed all of the requested documentation changes in the latest commit!

The only remaining discussion is the Quick Start example regarding exportConfig, where I was waiting for guidance since it was tagged for @martinkuba's input.

If you'd prefer me to update the example now, I'm happy to make that change as well. Otherwise, I'll wait for the decision on that discussion!

Whenever you have a chance, I'd appreciate another look. Thanks!

@Adii-45
Adii-45 requested a review from overbalance July 13, 2026 04:12
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.

Add docs for managing sessions

2 participants