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

Added CollectD JSON receiver #44

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Added CollectD JSON receiver #44

merged 1 commit into from
Dec 4, 2019

Conversation

owais
Copy link
Contributor

@owais owais commented Nov 25, 2019

Ported CollectD receiver from SignalFX Gateway to OpenTelemetry Collector

Ported from: https://github.com/signalfx/gateway/tree/master/protocol/collectd

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

Please rebase.

"github.com/golang/protobuf/ptypes/timestamp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Copy link
Member

Choose a reason for hiding this comment

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

Unneeded blank line.

"time"

"go.uber.org/zap"

Copy link
Member

Choose a reason for hiding this comment

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

Blank line.

receiver/collectdreceiver/factory.go Show resolved Hide resolved
@owais owais force-pushed the collectdreceiver branch 2 times, most recently from e19315f to a01f119 Compare November 27, 2019 11:04
@owais
Copy link
Contributor Author

owais commented Nov 27, 2019

@mdubbyap @keitwb can you please take a look as well? Thanks

@owais owais force-pushed the collectdreceiver branch 2 times, most recently from fb26eb4 to 6e004fa Compare November 27, 2019 11:12
@keitwb
Copy link
Contributor

keitwb commented Nov 27, 2019

This is really a receiver for the collectd write_http plugin with the Format "JSON" option, that should probably be clarified in the docs for this.

Also this is a super-set of the protocol that supports arbitrary dimensions via the square bracket, comma separated key value pairs appended to various fields of the value, which should also be clarified in the doc for this receiver as it is technically not fully backwards compatible with the original protocol since you could legally have square brackets in the value fields that could result in unintended conversions for people that weren't using the SignalFx-specific form of collectd.

@owais owais force-pushed the collectdreceiver branch 2 times, most recently from 1e954d0 to dc833e8 Compare December 3, 2019 11:20
@owais
Copy link
Contributor Author

owais commented Dec 3, 2019

Updated. @pjanotti please take a look as well when you can.

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM in general, a bunch of Qs and nits.

Makefile Show resolved Hide resolved
cmd/otelcontribcol/components.go Outdated Show resolved Hide resolved
receiver/collectdreceiver/README.md Outdated Show resolved Hide resolved
receiver/collectdreceiver/collectd.go Show resolved Hide resolved
receiver/collectdreceiver/config.go Outdated Show resolved Hide resolved
receiver/collectdreceiver/collectd.go Outdated Show resolved Hide resolved
receiver/collectdreceiver/collectd.go Show resolved Hide resolved
receiver/collectdreceiver/collectd.go Outdated Show resolved Hide resolved
lKeys, lValues := labelKeysAndValues(labels)
metric.MetricDescriptor = &metricspb.MetricDescriptor{
Name: name,
Type: r.metricType(dsType, isDouble),
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment: this bothers me on the proto: the point has the value but the metric descriptor too... so the format itself allow inconsistencies... am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does. In the sense that descriptor can say the metric is let's say commulative double but each point can be then be either int or double.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tigrannajaryan was the above improved in OTel metrics?

Copy link
Member

Choose a reason for hiding this comment

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

No, not improved. Otel metrics still has a type enum in the decsriptor and then a set of fields to store data points. It is possible to misuse it the same way we have here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth opening an issue on spec repo? Or there are reasons for that?

@owais owais force-pushed the collectdreceiver branch 4 times, most recently from 978a2b3 to c6389c4 Compare December 4, 2019 11:55
@owais
Copy link
Contributor Author

owais commented Dec 4, 2019

Thanks for the detailed review @pjanotti. Updated the PR.

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM. Please check the suggestion regarding the README.md

exporter/stackdriverexporter/go.sum Show resolved Hide resolved
receiver/collectdreceiver/README.md Outdated Show resolved Hide resolved
lKeys, lValues := labelKeysAndValues(labels)
metric.MetricDescriptor = &metricspb.MetricDescriptor{
Name: name,
Type: r.metricType(dsType, isDouble),
Copy link
Contributor

Choose a reason for hiding this comment

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

@tigrannajaryan was the above improved in OTel metrics?

receiver/collectdreceiver/collectd.go Show resolved Hide resolved
receiver/collectdreceiver/factory.go Show resolved Hide resolved
Makefile Show resolved Hide resolved
receiver/collectdreceiver/collectd.go Show resolved Hide resolved
receiver/collectdreceiver/receiver.go Show resolved Hide resolved
Ported SignalFx CollectD receiver from SignalFX Gateway to OpenTelemetry Collector

Ported from: https://github.com/signalfx/gateway/tree/master/protocol/collectd
@pjanotti pjanotti merged commit 01bc5ae into master Dec 4, 2019
@pjanotti pjanotti deleted the collectdreceiver branch December 4, 2019 19:20
@pjanotti pjanotti mentioned this pull request Dec 8, 2019
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
codeboten pushed a commit that referenced this pull request Nov 23, 2022
The files removed in this change already have instrumentation in the opentelemetry-python repo. Removing them from this reference folder as they're no longer needed.
jj22ee pushed a commit to jj22ee/opentelemetry-collector-contrib that referenced this pull request Sep 21, 2023
…pen-telemetry#44)

* Modify resourcedetection processor to use our aws-cwa-dev confighttp
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.

None yet

4 participants