[PR #552] [MERGED] Feat/Implement structured logging and Trace ID propagation #577

Closed
opened 2026-02-16 01:16:22 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/552
Author: @41tair
Created: 12/24/2025
Status: Merged
Merged: 12/29/2025
Merged by: @41tair

Base: mainHead: feat/log-formatter


📝 Commits (10+)

  • 54e729c use slog instead of log package and format to new log schema
  • c78e173 update the environment name to LOG_OUTPUT_FORMAT
  • 844bd25 add the env to .env.example
  • 22caa9a fix log reference error
  • 1066047 change the order of milldlewares
  • 7f6cf7e delete unused code
  • c7eca22 fix the concurrently session potential race condition
  • afc6529 fix the log format in tests
  • 6553aa4 update the duplicate code
  • 894845b refactor: convert log functions to slog structured format

📊 Changes

88 files changed (+1262 additions, -380 deletions)

View changed files

📝 .env.example (+4 -0)
📝 cmd/commandline/bundle.go (+3 -3)
📝 cmd/commandline/bundle/bump_version.go (+3 -3)
📝 cmd/commandline/bundle/dep.go (+37 -36)
📝 cmd/commandline/bundle/encoder.go (+1 -1)
📝 cmd/commandline/bundle/init.go (+10 -10)
📝 cmd/commandline/bundle/package.go (+4 -4)
📝 cmd/commandline/plugin/checksum.go (+6 -6)
📝 cmd/commandline/plugin/encoder.go (+1 -1)
📝 cmd/commandline/plugin/init.go (+23 -23)
📝 cmd/commandline/plugin/list_readme.go (+5 -5)
📝 cmd/commandline/plugin/module.go (+27 -31)
📝 cmd/commandline/plugin/package.go (+4 -4)
📝 cmd/commandline/plugin/permission.go (+4 -4)
📝 cmd/commandline/run/run.go (+2 -6)
📝 cmd/commandline/signature.go (+1 -1)
📝 cmd/commandline/signature/generate.go (+4 -6)
📝 cmd/commandline/signature/sign.go (+6 -6)
📝 cmd/commandline/signature/verify.go (+7 -7)
📝 cmd/license/sign/main.go (+4 -4)

...and 68 more files

📄 Description

Description

Implement structured logging and Trace ID propagation
Closes #551

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

image

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/552 **Author:** [@41tair](https://github.com/41tair) **Created:** 12/24/2025 **Status:** ✅ Merged **Merged:** 12/29/2025 **Merged by:** [@41tair](https://github.com/41tair) **Base:** `main` ← **Head:** `feat/log-formatter` --- ### 📝 Commits (10+) - [`54e729c`](https://github.com/langgenius/dify-plugin-daemon/commit/54e729c9667fadee4fd8d58def83d54381e0b70b) use slog instead of log package and format to new log schema - [`c78e173`](https://github.com/langgenius/dify-plugin-daemon/commit/c78e173f520d55bacb0b821394211e294ee31c33) update the environment name to LOG_OUTPUT_FORMAT - [`844bd25`](https://github.com/langgenius/dify-plugin-daemon/commit/844bd257a1570888c8d6c054a07bf41d73190b8c) add the env to .env.example - [`22caa9a`](https://github.com/langgenius/dify-plugin-daemon/commit/22caa9a6be1de5703bb086ff8a56968db3633d0d) fix log reference error - [`1066047`](https://github.com/langgenius/dify-plugin-daemon/commit/1066047d9a5065ec0465d8eb906b0c7c52c22f1c) change the order of milldlewares - [`7f6cf7e`](https://github.com/langgenius/dify-plugin-daemon/commit/7f6cf7e463cf49260d70e7932f587a7b551ba462) delete unused code - [`c7eca22`](https://github.com/langgenius/dify-plugin-daemon/commit/c7eca22da8b033bb17798f585dcb3ab54a91b7d6) fix the concurrently session potential race condition - [`afc6529`](https://github.com/langgenius/dify-plugin-daemon/commit/afc652967b9101f29b0e4e4a93b280127efd6fc0) fix the log format in tests - [`6553aa4`](https://github.com/langgenius/dify-plugin-daemon/commit/6553aa483e13eca2ebe1f8272e906def446c56f4) update the duplicate code - [`894845b`](https://github.com/langgenius/dify-plugin-daemon/commit/894845b2fd403cc4c875a36bd869b13c5c4d0538) refactor: convert log functions to slog structured format ### 📊 Changes **88 files changed** (+1262 additions, -380 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -0) 📝 `cmd/commandline/bundle.go` (+3 -3) 📝 `cmd/commandline/bundle/bump_version.go` (+3 -3) 📝 `cmd/commandline/bundle/dep.go` (+37 -36) 📝 `cmd/commandline/bundle/encoder.go` (+1 -1) 📝 `cmd/commandline/bundle/init.go` (+10 -10) 📝 `cmd/commandline/bundle/package.go` (+4 -4) 📝 `cmd/commandline/plugin/checksum.go` (+6 -6) 📝 `cmd/commandline/plugin/encoder.go` (+1 -1) 📝 `cmd/commandline/plugin/init.go` (+23 -23) 📝 `cmd/commandline/plugin/list_readme.go` (+5 -5) 📝 `cmd/commandline/plugin/module.go` (+27 -31) 📝 `cmd/commandline/plugin/package.go` (+4 -4) 📝 `cmd/commandline/plugin/permission.go` (+4 -4) 📝 `cmd/commandline/run/run.go` (+2 -6) 📝 `cmd/commandline/signature.go` (+1 -1) 📝 `cmd/commandline/signature/generate.go` (+4 -6) 📝 `cmd/commandline/signature/sign.go` (+6 -6) 📝 `cmd/commandline/signature/verify.go` (+7 -7) 📝 `cmd/license/sign/main.go` (+4 -4) _...and 68 more files_ </details> ### 📄 Description ## Description Implement structured logging and Trace ID propagation Closes #551 ## Type of Change - [ ] Bug fix - [X] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [X] I have tested the changes locally and confirmed they work as expected - [X] I have added unit tests where necessary and they pass successfully ### Bug Fix (if applicable) - [X] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## Additional Information <img width="1841" height="674" alt="image" src="https://github.com/user-attachments/assets/fa13476a-b3e7-46de-bae6-40a933be2223" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:22 -05:00
yindo closed this issue 2026-02-16 01:16:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#577