Skip to content
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

feat(serializers): Add CloudEvents serializer #13224

Merged

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented May 2, 2023

resolves #10170

This PR adds a serializer to convert Telegraf metrics into the CloudEvents JSON format.

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 2, 2023
@srebhan srebhan changed the title feat(serializers): A CloudEvents serializer feat(serializers): Add CloudEvents serializer May 2, 2023
@srebhan srebhan added plugin/serializer ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. labels May 2, 2023
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Can I suggest tossing your batch-metrics expected.json output into a JSON Schema validator along with the cloudevents schema. I noticed that the timedev claims it must match RFC 3339 (e.g. 2018-04-05T17:31:00Z)

Otherwise I think this is nearly good to go. Let me know what you think about the time one and I can give this a more complete review

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

+1 thank you for researching the timestamp.

Needs an update to resolve a conflict in go.mod. Feel free to merge once fixed.

@powersj powersj assigned srebhan and unassigned powersj May 5, 2023
@srebhan srebhan force-pushed the serializer_cloudevents_issue_10170 branch from cc32f8c to 201dc96 Compare May 5, 2023 17:13
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented May 5, 2023

Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 5.46 % for linux amd64 (new size: 184.7 MB, nightly size 175.1 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

@powersj powersj merged commit 1bcc279 into influxdata:master May 5, 2023
@srebhan srebhan added this to the v1.27.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/serializer ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudEvents output data format support
2 participants