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

Telemetrygen fails to parse ip for otlp-endpoint provided #26659

Closed
asreehari-splunk opened this issue Sep 12, 2023 · 8 comments · Fixed by #27079
Closed

Telemetrygen fails to parse ip for otlp-endpoint provided #26659

asreehari-splunk opened this issue Sep 12, 2023 · 8 comments · Fixed by #27079
Assignees
Labels
bug Something isn't working cmd/telemetrygen telemetrygen command

Comments

@asreehari-splunk
Copy link
Contributor

asreehari-splunk commented Sep 12, 2023

Component(s)

cmd/telemetrygen

What happened?

Description

We've used this tool to generate load in the recent past but when we tried this last week with the following command, the tool complained that parsing the IP and port failed

telemetrygen traces --duration 30m --otlp-endpoint 127.0.1.1:8080 --otlp-header "X-SF-Token=\"MyToken\"" --otlp-header "Content-Type"="\"application/x-protobuf\"" --workers 3 --otlp-insecure true --rate 6000

Steps to Reproduce

Expected Result

To send traffic like it did before

Actual Result

2023-09-08T08:48:38.590-0700 INFO grpc@v1.57.0/clientconn.go:1791 [core][Channel #1] dial target "127.0.1.1:8080" parse failed: parse "127.0.1.1:8080": first path segment in URL cannot contain colon {"system": "grpc", "grpc_log": true}

Collector version

latest

Environment information

Environment

OS: Mac OSx Ventura
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

2023-09-08T08:48:38.590-0700	INFO	grpc@v1.57.0/clientconn.go:1791	[core][Channel #1] dial target "127.0.1.1:8080" parse failed: parse "127.0.1.1:8080": first path segment in URL cannot contain colon	{"system": "grpc", "grpc_log": true}

Additional context

.

@asreehari-splunk asreehari-splunk added bug Something isn't working needs triage New item requiring triage labels Sep 12, 2023
@github-actions github-actions bot added the cmd/telemetrygen telemetrygen command label Sep 12, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@atoulme atoulme removed the needs triage New item requiring triage label Sep 12, 2023
@codeboten
Copy link
Contributor

I see the same error, but my traffic is still being sent, can you confirm whether or not that happens in your case as well? The address shown in the example above is 127.0.1.1, did you mean to use to use 127.0.0.1?

@asreehari-splunk
Copy link
Contributor Author

asreehari-splunk commented Sep 12, 2023 via email

@atoulme
Copy link
Contributor

atoulme commented Sep 12, 2023

I will work on this with adding an integration test first.

@atoulme
Copy link
Contributor

atoulme commented Sep 15, 2023

It appears this issue is not blocking telemetrygen. The error message is misleading. Adding the scheme passthrough to the endpoint helps: passthrough:///192.168.0.1:9080

@atoulme
Copy link
Contributor

atoulme commented Sep 22, 2023

After a bit of research, it appears we specifically disable warn logging for the collector as info is deemed chatty. I think we can do that as well here, as logs emitted at info level by grpc are causing confusion.

See https://github.com/open-telemetry/opentelemetry-collector/blob/e116f8c928eb49ba6816751397f5e9e3cf867856/otelcol/internal/grpclog/logger.go#L15C9-L15C53 for how we mirror the behavior of setting the grpc logger.

@asreehari-splunk
Copy link
Contributor Author

asreehari-splunk commented Sep 22, 2023 via email

codeboten pushed a commit that referenced this issue Sep 22, 2023
Move the telemetrygen tool to use gRPC logging at warn level, in line
with otlpgrpc.

See
https://github.com/open-telemetry/opentelemetry-collector/blob/e116f8c928eb49ba6816751397f5e9e3cf867856/otelcol/internal/grpclog/logger.go#L15C9-L15C53
for how we mirror the behavior of setting the grpc logger.

Fixes #26659
@atoulme
Copy link
Contributor

atoulme commented Sep 22, 2023

Right, there was no bug in the behavior, but this log was misleading. Excluding this class of logs makes sense to reduce confusion, and we have done so now.

mx-psi pushed a commit that referenced this issue Sep 25, 2023
It shows trace ingest with otlp.

Relates to #26659
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmd/telemetrygen telemetrygen command
Projects
None yet
3 participants