Skip to content

Conversation

@nirga
Copy link
Member

@nirga nirga commented Nov 25, 2025

Important

Remove telemetry and event tracking from SDK, including Telemetry class and posthog-node dependency.

  • Behavior:
    • Removed telemetry data collection and event tracking functionality.
    • Switched error reporting to local console logging instead of remote capture in decorators.ts and index.ts.
  • Dependencies:
    • Removed posthog-node from package.json.
  • Code Removal:
    • Deleted telemetry.ts file.
    • Removed Telemetry class usage from prompts/index.ts, tracing/decorators.ts, and tracing/index.ts.

This description was created by Ellipsis for 34935a7. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • Chores
    • Removed telemetry and event-tracking functionality from the SDK.
    • Removed the external telemetry dependency.
    • Replaced remote error/event reporting with local console debug logging.
    • Eliminated anonymous identifier file handling and related runtime telemetry behavior.
    • Updated instrumentation paths to rely on local logging instead of remote reporting.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

This PR removes telemetry from traceloop-sdk: deletes the Telemetry implementation, removes the PostHog dependency, eliminates telemetry capture calls, and replaces telemetry-based exception logging with local console.debug logging or no-ops.

Changes

Cohort / File(s) Summary
Dependency removal
packages/traceloop-sdk/package.json
Removed posthog-node from dependencies.
Telemetry implementation removal
packages/traceloop-sdk/src/lib/telemetry/telemetry.ts
Deleted the exported Telemetry class and all related singleton logic, anon-id file handling, PostHog initialization, capture, and logException methods.
Telemetry capture removal
packages/traceloop-sdk/src/lib/prompts/index.ts
Removed Telemetry.getInstance().capture("prompt:rendered") import and call from getPrompt.
Error-logging migration
packages/traceloop-sdk/src/lib/tracing/decorators.ts, packages/traceloop-sdk/src/lib/tracing/index.ts
Replaced Telemetry.getInstance().logException(...) usages with console.debug(...) messages (no external telemetry calls remain).

Sequence Diagram(s)

Old telemetry flow (before changes)

sequenceDiagram
    participant Caller as Feature Code
    participant Telemetry as Telemetry (PostHog)
    Caller->>Telemetry: capture(event) / logException(err)
    Telemetry-->>Caller: (async) send to PostHog / persist anon-id
    note right of Telemetry `#DDEBF7`: External network I/O and file I/O
Loading

New flow (after changes)

sequenceDiagram
    participant Caller as Feature Code
    participant Console as Console / No-op
    Caller->>Console: console.debug(...) or no-op
    note right of Console `#F6F8E9`: Local logging / no external I/O
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify no remaining imports or references to the removed Telemetry across the repo.
  • Inspect package manifests / lockfiles for leftover posthog-node traces.
  • Confirm that replacing telemetry logging with console.debug doesn't omit required operational alerts.

Suggested reviewers

  • doronkopit5

Poem

🐰
I hopped through code to tidy the trail,
PostHog footprints gone down the pale.
Quiet logs where wild bytes roam,
A lighter branch, a cleaner home.
Nibble, hop — the repo's hale. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(sdk): remove posthog and telemetry reporting' directly and clearly summarizes the main objective of the changeset: removing PostHog dependency and telemetry functionality from the SDK.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-posthog

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 34935a7 and 72fca85.

📒 Files selected for processing (1)
  • packages/traceloop-sdk/src/lib/tracing/index.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import AI/LLM semantic attribute constants from @traceloop/ai-semantic-conventions rather than hardcoding strings

Files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
packages/traceloop-sdk/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/traceloop-sdk/**/*.{ts,tsx}: Use the provided decorators (@workflow, @task, @agent) for workflow/task/agent spans instead of re-implementing them
For manual LLM operations, use trace.withLLMSpan from @traceloop/node-server-sdk

Files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/package.json : When adding a new instrumentation package, add it to the main SDK dependencies
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must capture and record errors appropriately

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/src/lib/node-server-sdk.ts : Register new instrumentation packages during SDK initialization

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : Use the provided decorators (workflow, task, agent) for workflow/task/agent spans instead of re-implementing them

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must extract request/response data and token usage from wrapped calls

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/package.json : When adding a new instrumentation package, add it to the main SDK dependencies

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must create spans with appropriate AI/LLM semantic attributes for calls they wrap

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentation classes must extend InstrumentationBase and register hooks using InstrumentationModuleDefinition

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and test

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 9fc4eea in 1 minute and 53 seconds. Click for details.
  • Reviewed 170 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/package.json:84
  • Draft comment:
    Removed dependency 'posthog-node' as part of telemetry removal. Ensure no remaining code depends on it.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that no remaining code depends on the removed dependency. This falls under the rule of not asking the author to double-check things or ensure behavior is intended. Therefore, it should be removed.
2. packages/traceloop-sdk/src/lib/prompts/index.ts:3
  • Draft comment:
    Remove the unused Telemetry import since telemetry reporting is removed.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/traceloop-sdk/src/lib/tracing/decorators.ts:17
  • Draft comment:
    Remove the Telemetry import here as the telemetry module has been deleted.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/traceloop-sdk/src/lib/tracing/index.ts:10
  • Draft comment:
    Remove the unused Telemetry import as the telemetry module no longer exists.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/traceloop-sdk/src/lib/tracing/index.ts:54
  • Draft comment:
    The exceptionLogger is now a no-op which may hide errors. Consider logging errors (e.g. using console.debug) to aid in debugging.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 15% vs. threshold = 50% The PR author deliberately changed the exception logger from calling Telemetry.getInstance().logException(e) to a no-op. This is clearly an intentional change. The comment is speculative - it says "may hide errors" and suggests an alternative implementation. However, this violates the rule about not making speculative comments. The author clearly intended to remove the exception logging, possibly to remove a dependency on Telemetry or to silence these exceptions. The comment is essentially questioning the author's decision and suggesting they do something different, without strong evidence that this is a bug. This is more of a code review opinion about whether exceptions should be logged, not a clear defect. The author may have intentionally removed exception logging for a good reason - perhaps the Telemetry dependency is being removed, or these exceptions were too noisy. The comment assumes that logging is always better, but that may not be the case. Without knowing the broader context of why this change was made, suggesting to add logging back (even with console.debug) may not be appropriate. While the author may have had reasons to remove the logging, the comment does raise a valid concern about debugging. However, this is speculative ("may hide errors") and suggests a different implementation approach rather than pointing out a clear bug. The rules state not to make speculative comments and to only comment if something is definitely an issue. This comment should be deleted. It's speculative ("may hide errors"), questions an intentional design decision by the author, and suggests an alternative implementation without strong evidence that the current change is wrong. The author deliberately removed exception logging, and we should assume they had a good reason.

Workflow ID: wflow_3JVB4zlmOPYkUIGo

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 1c39cf8 in 2 minutes and 3 seconds. Click for details.
  • Reviewed 168 lines of code in 5 files
  • Skipped 1 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/package.json:84
  • Draft comment:
    Removed the 'posthog-node' dependency. Ensure that no remaining code relies on it.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that no remaining code relies on the removed dependency. This falls under the rule of not asking the author to double-check things or ensure behavior, which is not allowed.
2. packages/traceloop-sdk/src/lib/prompts/index.ts:42
  • Draft comment:
    Removed telemetry capture call from getPrompt. Confirm that telemetry reporting is fully deprecated.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm that telemetry reporting is fully deprecated. This falls under asking the author to confirm their intention, which is against the rules. Therefore, this comment should be removed.
3. packages/traceloop-sdk/src/lib/telemetry/telemetry.ts:1
  • Draft comment:
    Entire telemetry module has been removed. Verify that no residual references to Telemetry remain in the codebase.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/traceloop-sdk/src/lib/tracing/decorators.ts:137
  • Draft comment:
    Replaced Telemetry.logException calls with console.debug. This change stops centralized error reporting – ensure that the new logging is sufficient for debugging.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. packages/traceloop-sdk/src/lib/tracing/index.ts:54
  • Draft comment:
    The exceptionLogger in initInstrumentations is now a no-op. Silently swallowing errors may obscure issues during instrumentation setup; consider at least minimal logging.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
6. packages/traceloop-sdk/src/lib/tracing/index.ts:136
  • Draft comment:
    In manuallyInitInstrumentations, the exceptionLogger is defined as a no-op. Consider logging exceptions to avoid silent failures during manual instrumentation.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 15% vs. threshold = 50% The PR author deliberately changed the exception logger from calling Telemetry.getInstance().logException(e) to a no-op function in both places. This is clearly an intentional change. The comment is essentially asking the author to reconsider their change and suggesting they should log exceptions instead. However, this violates the rule about not asking the PR author to confirm their intention or making speculative comments. The comment doesn't provide strong evidence that this change is wrong - it's just suggesting that silent failures might be bad. The author may have good reasons for this change (e.g., removing a dependency on Telemetry, avoiding circular dependencies, or changing the error handling strategy). Without strong evidence that this is definitely a bug, this is just a suggestion to reconsider an intentional change. Could the author have made a mistake and accidentally removed important error logging? Perhaps there's a real risk of silent failures that would be hard to debug. The comment might be highlighting a legitimate concern about observability. While error logging is generally good practice, the PR author made this change deliberately in both functions. Without evidence that this breaks something or causes a specific problem, this is just questioning the author's intentional design decision. The rules specifically say not to ask the author to confirm their intention or make speculative "this might be an issue" comments. This comment should be deleted. It's questioning an intentional change made by the PR author without providing strong evidence that the change is wrong. It's essentially asking the author to reconsider their decision, which violates the rule about not asking authors to confirm their intentions.

Workflow ID: wflow_oaKfQQghn0HjIZTd

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed a80cf9d in 50 seconds. Click for details.
  • Reviewed 170 lines of code in 5 files
  • Skipped 1 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/package.json:85
  • Draft comment:
    Good removal of the telemetry dependency 'posthog-node'. Ensure no remaining code references it.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the author to ensure that no code references a removed dependency. This is similar to asking the author to double-check or verify something, which is against the rules. The comment does not provide a specific suggestion or point out a specific issue in the code.
2. packages/traceloop-sdk/src/lib/prompts/index.ts:3
  • Draft comment:
    Remove the unused Telemetry import since telemetry reporting has been removed.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/traceloop-sdk/src/lib/tracing/decorators.ts:17
  • Draft comment:
    Remove the Telemetry import here as telemetry functionality is removed; using console.debug is sufficient.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/traceloop-sdk/src/lib/tracing/index.ts:10
  • Draft comment:
    Remove the unused Telemetry import and reconsider the empty exceptionLogger. Using an empty function (line 54) may swallow errors; consider logging them (e.g. with console.debug) for consistency with decorators.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_Y0EgzNLKPTljc5UT

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 34935a7 in 57 seconds. Click for details.
  • Reviewed 193 lines of code in 5 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/package.json:84
  • Draft comment:
    Removed 'posthog-node' dependency as expected. Ensure that any associated documentation or configuration notes are updated to reflect the removal of telemetry reporting.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. packages/traceloop-sdk/src/lib/tracing/decorators.ts:136
  • Draft comment:
    Telemetry log calls were replaced with console.debug. For consistent error reporting across modules, consider using a unified logging approach (e.g. using console.debug or console.error uniformly).
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. packages/traceloop-sdk/src/lib/tracing/index.ts:54
  • Draft comment:
    The exceptionLogger is now defined as an empty function. To align with the intended local error reporting (as described in the PR), consider logging errors (e.g. with console.debug) instead of silently ignoring them.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_rHvPSDZTAm1JUfph

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/traceloop-sdk/src/lib/tracing/index.ts (1)

10-10: No-op exceptionLogger is fine; clean up the stale Telemetry import

The no-op exceptionLogger in both initInstrumentations and manuallyInitInstrumentations looks correct and keeps the instrumentation config surface stable while removing telemetry side effects.

However, Telemetry is still imported (Line 10) and no longer used. Given this PR’s goal to remove telemetry (and likely the telemetry module itself), this import should be removed to avoid an unused symbol and a potential compile-time/module-resolution failure if ../telemetry/telemetry is deleted.

A minimal cleanup would be:

-import { Telemetry } from "../telemetry/telemetry";

Also applies to: 54-55, 137-138

packages/traceloop-sdk/src/lib/tracing/decorators.ts (1)

17-17: console.debug replacement is reasonable; remove unused Telemetry import

Swapping Telemetry.getInstance().logException(error) for console.debug(...) in the three catch blocks keeps serialization failures non-fatal while still offering some debuggability, which is compatible with the original control flow and with removing central telemetry.

The Telemetry import (Line 17) is now unused and, combined with the PR’s aim to delete the telemetry implementation, should be removed to avoid dead code and potential module-resolution issues:

-import { Telemetry } from "../telemetry/telemetry";

This keeps the decorators file free of telemetry concerns while still relying on OTel span attributes from @traceloop/ai-semantic-conventions, as per the coding guidelines.

Also applies to: 137-137, 152-152, 168-168

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 116a6c0 and a80cf9d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • packages/traceloop-sdk/package.json (0 hunks)
  • packages/traceloop-sdk/src/lib/prompts/index.ts (0 hunks)
  • packages/traceloop-sdk/src/lib/telemetry/telemetry.ts (0 hunks)
  • packages/traceloop-sdk/src/lib/tracing/decorators.ts (3 hunks)
  • packages/traceloop-sdk/src/lib/tracing/index.ts (2 hunks)
💤 Files with no reviewable changes (3)
  • packages/traceloop-sdk/src/lib/prompts/index.ts
  • packages/traceloop-sdk/package.json
  • packages/traceloop-sdk/src/lib/telemetry/telemetry.ts
🧰 Additional context used
📓 Path-based instructions (2)
packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import AI/LLM semantic attribute constants from @traceloop/ai-semantic-conventions rather than hardcoding strings

Files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
packages/traceloop-sdk/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/traceloop-sdk/**/*.{ts,tsx}: Use the provided decorators (@workflow, @task, @agent) for workflow/task/agent spans instead of re-implementing them
For manual LLM operations, use trace.withLLMSpan from @traceloop/node-server-sdk

Files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : Use the provided decorators (workflow, task, agent) for workflow/task/agent spans instead of re-implementing them

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must capture and record errors appropriately

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/src/lib/node-server-sdk.ts : Register new instrumentation packages during SDK initialization

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must create spans with appropriate AI/LLM semantic attributes for calls they wrap

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must extract request/response data and token usage from wrapped calls

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/package.json : When adding a new instrumentation package, add it to the main SDK dependencies

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a80cf9d and 34935a7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • packages/traceloop-sdk/package.json (0 hunks)
  • packages/traceloop-sdk/src/lib/prompts/index.ts (0 hunks)
  • packages/traceloop-sdk/src/lib/telemetry/telemetry.ts (0 hunks)
  • packages/traceloop-sdk/src/lib/tracing/decorators.ts (3 hunks)
  • packages/traceloop-sdk/src/lib/tracing/index.ts (2 hunks)
💤 Files with no reviewable changes (3)
  • packages/traceloop-sdk/src/lib/telemetry/telemetry.ts
  • packages/traceloop-sdk/src/lib/prompts/index.ts
  • packages/traceloop-sdk/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/traceloop-sdk/src/lib/tracing/decorators.ts
🧰 Additional context used
📓 Path-based instructions (2)
packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Import AI/LLM semantic attribute constants from @traceloop/ai-semantic-conventions rather than hardcoding strings

Files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
packages/traceloop-sdk/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/traceloop-sdk/**/*.{ts,tsx}: Use the provided decorators (@workflow, @task, @agent) for workflow/task/agent spans instead of re-implementing them
For manual LLM operations, use trace.withLLMSpan from @traceloop/node-server-sdk

Files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Do not implement anonymous telemetry collection in instrumentation packages; telemetry is collected only in the SDK

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : Use the provided decorators (workflow, task, agent) for workflow/task/agent spans instead of re-implementing them

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/src/lib/node-server-sdk.ts : Register new instrumentation packages during SDK initialization

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must extract request/response data and token usage from wrapped calls

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must create spans with appropriate AI/LLM semantic attributes for calls they wrap

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must capture and record errors appropriately

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/package.json : When adding a new instrumentation package, add it to the main SDK dependencies

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-13T08:00:42.668Z
Learnt from: galzilber
Repo: traceloop/openllmetry-js PR: 643
File: packages/traceloop-sdk/src/lib/interfaces/dataset.interface.ts:27-27
Timestamp: 2025-08-13T08:00:42.668Z
Learning: In packages/traceloop-sdk/src/lib/interfaces/dataset.interface.ts, when the user said "there is no date" in response to a comment about removing "date" from column type unions, they may have been referring to local changes not yet reflected in the PR branch, as the code still contained "date" in the union types at lines 27 and 43.

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentation classes must extend InstrumentationBase and register hooks using InstrumentationModuleDefinition

Applied to files:

  • packages/traceloop-sdk/src/lib/tracing/index.ts

nirga and others added 2 commits November 25, 2025 09:50
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@nirga nirga merged commit 61b32f7 into main Nov 25, 2025
7 checks passed
@nirga nirga deleted the remove-posthog branch November 25, 2025 07:53
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