-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tag_processor README adjustments #96
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request focuses on enhancing the documentation for the Changes
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 (4)
README.md (4)
749-750
: Consider enhancing the processor comparison with a table.While the current explanation is good, a comparison table would make it easier for users to understand when to use each processor. Consider adding a table that compares:
- Use cases
- Performance characteristics
- Ease of use
- Data model compatibility
1047-1048
: Add explanation of the "_historian" data contract.The reference to the "_historian" data contract would benefit from additional context. Consider adding:
- A brief explanation of what the "_historian" data contract is
- Its purpose in the UMH data model
- Link to detailed data contract documentation if available
1489-1517
: Improve JSON formatting in the example.The JSON example's indentation is inconsistent. Consider standardizing the indentation to make it more readable.
{ - "maintenanceSchedule": { - "eventType": "ScheduledMaintenance", + "maintenanceSchedule": { + "eventType": "ScheduledMaintenance", "eventId": "SM-20240717-025",
1554-1555
: Make the processor limitation note more prominent.The important note about payload structure limitations should be more prominent. Consider:
- Moving it to the beginning of the section
- Adding a visual separator or formatting to make it stand out
- Including it in the main processor comparison section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
README.md (1)
1500-1577
: Consider clarifying timestamp handling in the example.While the example effectively demonstrates payload processing, the hardcoded
timestamp_ms: 1733903611000
might be misleading. Consider either:
- Using the timestamp from the input message's
maintenanceSchedule.timestamp
field- Adding a note explaining that the timestamp is automatically added by the processor
- "timestamp_ms": 1733903611000 + "timestamp_ms": Math.floor(new Date(msg.payload.maintenanceSchedule.timestamp).getTime())
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: go-test-nodered-js
- GitHub Check: go-test-sensorconnect
- GitHub Check: go-test-tag-processor
- GitHub Check: go-test-opcua-plc
- GitHub Check: go-test-s7-plc
- GitHub Check: build-docker (arm/v7)
- GitHub Check: build-docker (arm64)
- GitHub Check: build-docker (amd64)
🔇 Additional comments (2)
README.md (2)
771-772
: LGTM! Clear guidance on processor selection.The explanation effectively helps users choose between
nodered_js
andtag_processor
based on their specific needs.
1069-1070
: LGTM! Clear explanation of tag_processor's purpose.The text effectively explains the specialized use case for
tag_processor
and its optimization for time series data.
README.md
Outdated
```yaml | ||
pipeline: | ||
processors: | ||
- nodered_js: | ||
code: | | ||
// set kafka topic manually | ||
msg.meta.topic = "umh.v1.enterprise.site.area._workorder.new" | ||
|
||
// only take two fields from the payload | ||
msg.meta.payload = { | ||
"maintenanceSchedule": { | ||
"eventType": msg.payload.maintenanceSchedule.eventType, | ||
"description": msg.payload.maintenanceSchedule.description | ||
} | ||
} | ||
return msg; | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect payload assignment in the example.
There's a bug in the code where the payload is incorrectly assigned to msg.meta.payload
instead of msg.payload
.
- msg.meta.payload = {
+ msg.payload = {
"maintenanceSchedule": {
"eventType": msg.payload.maintenanceSchedule.eventType,
"description": msg.payload.maintenanceSchedule.description
}
}
There was a problem hiding this 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
♻️ Duplicate comments (1)
README.md (1)
1582-1594
:⚠️ Potential issueFix incorrect payload assignment in the example.
There's a bug in the code where the payload is incorrectly assigned to
msg.meta.payload
instead ofmsg.payload
.- msg.meta.payload = { + msg.payload = { "maintenanceSchedule": { "eventType": msg.payload.maintenanceSchedule.eventType, "description": msg.payload.maintenanceSchedule.description } }
🧹 Nitpick comments (3)
README.md (3)
771-772
: Enhance processor comparison with data contract details.The comparison between
nodered_js
andtag_processor
could be more specific about the_historian
data contract mentioned. Consider adding a brief explanation of what this data contract entails.
1596-1597
: Enhance testing documentation with execution details.Consider adding:
- Step-by-step instructions for setting up the test environment
- Common troubleshooting steps for test failures
- Examples of environment parameter values
Line range hint
1644-1648
: Consider adding more support channels.To enhance user support, consider adding:
- GitHub Issues link for bug reports and feature requests
- Stack Overflow tag for technical questions
- Email contact for business inquiries
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README.md
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build-docker (arm/v7)
- GitHub Check: build-docker (arm64)
Summary by CodeRabbit
benthos-umh
project with detailed sections on the Modbus plugin, Node-RED JavaScript Processor, and Tag Processor.nodered_js
processor and usage examples.