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

Creating AWS S3 Config Source #4575

Closed
wants to merge 20 commits into from

Conversation

Aditya-Gollapudi
Copy link
Contributor

Moved this from collector to contrib

Note: Please don't review anything in the configprovider folder - that will all be merged in a different PR (coming from Paolo) The only stuff from this that will be merged is in the s3configsource folder. This PR was mostly submitted to try to parallelize some of the reviewing

Description: Added a Config Source for S3 inline with the new config source changes that have been made

Testing: So far there is only a core test, but I will continue to add them - this is something of a draft. Also please note that we expect the configprovider folder to be merged in at some point later on but that won't live here - where exactly everything is to be merged is still up in the air

@pjanotti

Link to old PR: open-telemetry/opentelemetry-collector#3738

@bogdandrutu
Copy link
Member

Please fix the build:

# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter
exporter\awsemfexporter\grouped_metric.go:20:2: json redeclared as imported package name
	previous declaration at exporter\awsemfexporter\grouped_metric.go:18:2
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontribcol [build failed]
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/internal/version	0.040s [no tests to run]
FAIL

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Is it possible to use an abstraction like vfs to support all clouds?

https://github.com/C2FO/vfs

Reading config files doesn't seem like an extremely high-scale operation or anything that might benefit performance-wise from being "closer to metal" using the raw cloud sdks so maybe it's practical.

package awss3configsource

import (
splunkprovider "github.com/signalfx/splunk-otel-collector"
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems quite odd for the upstream collector to depend on a downstream distro, it's like a circular dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Splunk is currently submitting a string of PRs into Collector - the plan is to have this merged in - in fact in the go.mod file I replace this reference with a local reference to the config provider folder

github.com/knadh/koanf v1.2.0
github.com/signalfx/splunk-otel-collector v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.31.0
Copy link
Member

Choose a reason for hiding this comment

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

Please use the same version as other go.mod in the repo

@Aditya-Gollapudi
Copy link
Contributor Author

https://github.com/C2FO/vfs

@anuraaga Is VFS approved by security - I didn't spend a bunch of time thinking about it as I was under the impression that it would be rejected by AppSec out of hand

Additionally, the goal of the config source interface is for each of the cloud providers to eventually add their own config source

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 31, 2021
@anuraaga
Copy link
Contributor

anuraaga commented Aug 31, 2021

@Aditya-Gollapudi Sorry for missing the comment from 20 days ago just saw it now. In principle, basically nothing is approved by AWS security as they check at a macro level - even if using the AWS SDK, the usage of the AWS SDK needs to get checked, etc. On the flip side, if using a different library like vfs, then the usage of that library would be checked in a similar way. Since VFS itself just wraps the AWS SDK, this will be straightforward.

Also, this is the OpenTelemetry Collector - what's important is creating a component that makes sense for this codebase. If it's possible to make a generic mechanism for configuration across cloud providers, then that is a much better fit for this codebase than another mechanism that duplicates logic, with greater maintenance cost. If we think such a mechanism is simple, secure, and performant, than internal security review can be made to happen.

@Aditya-Gollapudi
Copy link
Contributor Author

@anuraaga Thanks for getting back - I believe that AppSec (perhaps AWS security is different) did approve the usage of the SDK in the way I did above - I didn't know that it was possible to get VFS approved. If that is the case I agree it makes some sense to use it as it more generic.

However, I am no longer at Amazon for the moment so I'm not actively working on this. I believe Tianduo Hao is continuing my work (for some reason I can't seem to @skyduo)

@bogdandrutu bogdandrutu removed the Stale label Aug 31, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 7, 2021
@tigrannajaryan
Copy link
Member

@bogdandrutu @Aneurysm9 and I discussed how the Collector configuration can be extended to support the remote configuration needs. We do not think that the current ConfigSource approach fully covers all the uses cases and need to be extended somewhat. Please see the proposal here open-telemetry/opentelemetry-collector#4190
Until we agree on this please hold on merging this PR.

@github-actions github-actions bot removed the Stale label Oct 13, 2021
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 13, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2021

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Dec 3, 2021
hex1848 pushed a commit to hex1848/opentelemetry-collector-contrib that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants