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

Expose Endpoint and Insecure on googlecloudpubsub exporter #29304

Closed
marcosrmendezthd opened this issue Nov 16, 2023 · 6 comments
Closed

Expose Endpoint and Insecure on googlecloudpubsub exporter #29304

marcosrmendezthd opened this issue Nov 16, 2023 · 6 comments
Assignees
Labels

Comments

@marcosrmendezthd
Copy link

marcosrmendezthd commented Nov 16, 2023

Component(s)

No response

Is your feature request related to a problem? Please describe.

We are creating self-contained integration tests. While the pubsub receiver allows the endpoint and insecure configurations, the exporter does not.

Describe the solution you'd like

The ability to set the endpoint and insecure configuration options.

exporters:
  googlecloudpubsub:
    project: abc
    endpoint: mytestendpoint
    user_agent: projects/abc/topics/requests
    insecure: true

Describe alternatives you've considered

No response

Additional context

No response

@marcosrmendezthd marcosrmendezthd added enhancement New feature or request needs triage New item requiring triage labels Nov 16, 2023
@crobert-1
Copy link
Member

crobert-1 commented Nov 21, 2023

Is this needed outside of testing environments? If it's only for testing there are existing internal options for endpoint and insecure.

endpoint and insecure definition in config:

// Override of the Pubsub endpoint, for testing only
endpoint string
// Only has effect if Endpoint is not ""
insecure bool

Example usage in a test:

exporterConfig.endpoint = srv.Addr
exporterConfig.UserAgent = "test-user-agent"
exporterConfig.insecure = true

Is this what you're looking for, or am I missing something?

Copy link
Contributor

Pinging code owners for exporter/googlecloudpubsub: @alexvanboxel. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@marcosrmendezthd
Copy link
Author

marcosrmendezthd commented Nov 21, 2023

yes @crobert-1 . that's exactly what I need. I'm making them public with some sed magic on my pipelines so that I can use a pubsub emulator and test what I need. I may send a simple PR for that if nobody can address it.

@crobert-1
Copy link
Member

yes @crobert-1 . that's exactly what I need. I'm making them public with some sed magic on my pipelines so that I can use a pubsub emulator and test what I need. I may send a simple PR for that if nobody can address it.

I'm not sure I understand the situation fully, do you need these member properties to be public? If the tests are being added to this repository and module, you'd have access to the private properties.

@alexvanboxel
Copy link
Contributor

I will expose the insecure field in both the receiver and the exporter (aligned with the other gRPC configurations in the collector)

@crobert-1 crobert-1 removed waiting for author needs triage New item requiring triage labels Dec 11, 2023
alexvanboxel added a commit to alexvanboxel/opentelemetry-collector-contrib that referenced this issue Dec 12, 2023
expose `Endpoint` and `Insecure` in configuration

fixes: open-telemetry#29304
codeboten pushed a commit that referenced this issue Dec 14, 2023
**Description:**
expose `Endpoint` and `Insecure` in configuration

**Link to tracking Issue:**
#29304

**Testing:**
Adapted tests to use the new attributes

**Documentation:**
Added new attributes to documentation
@codeboten
Copy link
Contributor

Fixed by #29740

cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jan 10, 2024
…try#29740)

**Description:**
expose `Endpoint` and `Insecure` in configuration

**Link to tracking Issue:**
open-telemetry#29304

**Testing:**
Adapted tests to use the new attributes

**Documentation:**
Added new attributes to documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants