KEMBAR78
KG-427: Add support for trace-level attributes in Langfuse integration by denis-domanskii · Pull Request #860 · JetBrains/koog · GitHub
Skip to content

Conversation

@denis-domanskii
Copy link
Contributor

Issue: https://youtrack.jetbrains.com/issue/KG-427/Support-LangFuse-trace-level-attributes

Key Updates

  • Introduced traceAttributes parameter in addLangfuseExporter to enable custom attributes (e.g., sessions, tags) for observability.
  • Updated LangfuseSpanAdapter to apply trace-level attributes to spans.
  • Added extensive documentation for trace attributes in OpenTelemetry Langfuse guide.
  • Enhanced test coverage for handling trace attributes and metadata.

Motivation and Context

Breaking Changes


Type of the changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tests improvement
  • Refactoring

Checklist

  • The pull request has a description of the proposed change
  • I read the Contributing Guidelines before opening the pull request
  • The pull request uses develop as the base branch
  • Tests for the changes have been added
  • All new and existing tests passed
Additional steps for pull requests adding a new feature
  • An issue describing the proposed change exists
  • The pull request includes a link to the issue
  • The change was discussed and approved in the issue
  • Docs have been added / updated

### Key Updates
- Introduced `traceAttributes` parameter in `addLangfuseExporter` to enable custom attributes (e.g., sessions, tags) for observability.
- Updated `LangfuseSpanAdapter` to apply trace-level attributes to spans.
- Added extensive documentation for trace attributes in OpenTelemetry Langfuse guide.
- Enhanced test coverage for handling trace attributes and metadata.
@github-actions
Copy link

github-actions bot commented Sep 24, 2025

Qodana for JVM

895 new problems were found

Inspection name Severity Problems
Check Kotlin and Java source code coverage 🔶 Warning 850
Missing KDoc for public API declaration 🔶 Warning 24
Vulnerable imported dependency 🔶 Warning 21
@@ Code coverage @@
+ 68% total lines covered
12204 lines analyzed, 8393 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Contributor

@sdubov sdubov left a comment

Choose a reason for hiding this comment

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

@denis-domanskii, thank you for the clear fix! LGTM!

@denis-domanskii denis-domanskii merged commit fb0a7b1 into develop Sep 25, 2025
29 of 35 checks passed
@denis-domanskii denis-domanskii deleted the domanskii/KG-427-Support-LangFuse-trace-level-attributes branch September 25, 2025 13:11
karloti pushed a commit to karloti/koog that referenced this pull request Oct 21, 2025
JetBrains#860)

Issue:
https://youtrack.jetbrains.com/issue/KG-427/Support-LangFuse-trace-level-attributes

### Key Updates
- Introduced `traceAttributes` parameter in `addLangfuseExporter` to
enable custom attributes (e.g., sessions, tags) for observability.
- Updated `LangfuseSpanAdapter` to apply trace-level attributes to
spans.
- Added extensive documentation for trace attributes in OpenTelemetry
Langfuse guide.
- Enhanced test coverage for handling trace attributes and metadata.

<!--
Thank you for opening a pull request!

Please add a brief description of the proposed change here.
Also, please tick the appropriate points in the checklist below.
-->

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->

## Breaking Changes
<!-- Will users need to update their code or configurations? -->

---

#### Type of the changes
- [x] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Tests improvement
- [ ] Refactoring

#### Checklist
- [x] The pull request has a description of the proposed change
- [x] I read the [Contributing
Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md)
before opening the pull request
- [x] The pull request uses **`develop`** as the base branch
- [x] Tests for the changes have been added
- [x] All new and existing tests passed

##### Additional steps for pull requests adding a new feature
- [x] An issue describing the proposed change exists
- [x] The pull request includes a link to the issue
- [x] The change was discussed and approved in the issue
- [x] Docs have been added / updated
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.

2 participants