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

Don't escape go error output in builder #6603

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

mattsains
Copy link
Contributor

Fixes #6591

Description:
Fixes #6591

Whereas before an error would look like this:

2022-11-22T08:38:42.377-0800    INFO    internal/command.go:125 OpenTelemetry Collector Builder {"version": "dev", "date": "unknown"}
2022-11-22T08:38:42.382-0800    INFO    internal/command.go:158 Using config file       {"path": "./cmd/otelcontribcol/manifest.yaml"}
2022-11-22T08:38:42.383-0800    INFO    builder/config.go:107   Using go        {"go-executable": "/usr/bin/go"}
2022-11-22T08:38:42.394-0800    INFO    builder/main.go:76      Sources created {"path": "./bin"}
2022-11-22T08:38:43.582-0800    INFO    builder/main.go:118     Getting go modules
2022-11-22T08:38:43.750-0800    INFO    builder/main.go:87      Compiling
Error: failed to compile the OpenTelemetry Collector distribution: exit status 2. Output: "# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator\n../exporter/awsxrayexporter/internal/translator/segment.go:193:41: undefined: traceutil.SpanIDToHexOrEmptyString\n../exporter/awsxrayexporter/internal/translator/segment.go:198:41: undefined: traceutil.SpanIDToHexOrEmptyString\n# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter\n<snip>

It now looks like this:

2022-11-22T08:38:42.377-0800    INFO    internal/command.go:125 OpenTelemetry Collector Builder {"version": "dev", "date": "unknown"}
2022-11-22T08:38:42.382-0800    INFO    internal/command.go:158 Using config file       {"path": "./cmd/otelcontribcol/manifest.yaml"}
2022-11-22T08:38:42.383-0800    INFO    builder/config.go:107   Using go        {"go-executable": "/usr/bin/go"}
2022-11-22T08:38:42.394-0800    INFO    builder/main.go:76      Sources created {"path": "./bin"}
2022-11-22T08:38:43.582-0800    INFO    builder/main.go:118     Getting go modules
2022-11-22T08:38:43.750-0800    INFO    builder/main.go:87      Compiling
Error: failed to compile the OpenTelemetry Collector distribution: exit status 2. Output:
# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator
../exporter/awsxrayexporter/internal/translator/segment.go:193:41: undefined: traceutil.SpanIDToHexOrEmptyString
../exporter/awsxrayexporter/internal/translator/segment.go:198:41: undefined: traceutil.SpanIDToHexOrEmptyString
# github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter
<snip>

Link to tracking Issue: #6591

Testing: I manually tested the output to be able to write this PR description, and I ran make all in the repo.

@mattsains mattsains requested review from a team and bogdandrutu November 22, 2022 16:47
@mattsains
Copy link
Contributor Author

@jpkrohling perhaps you could review this?

@jpkrohling jpkrohling requested review from jpkrohling and removed request for bogdandrutu November 28, 2022 19:47
@jpkrohling jpkrohling added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Nov 28, 2022
@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 91.09% // Head: 91.06% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (fd6559b) compared to base (afe4827).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6603      +/-   ##
==========================================
- Coverage   91.09%   91.06%   -0.03%     
==========================================
  Files         241      241              
  Lines       14064    14064              
==========================================
- Hits        12811    12808       -3     
- Misses       1004     1006       +2     
- Partials      249      250       +1     
Impacted Files Coverage Δ
cmd/builder/internal/builder/main.go 54.76% <0.00%> (ø)
service/telemetry.go 86.66% <0.00%> (-1.67%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bogdandrutu bogdandrutu merged commit 30cac33 into open-telemetry:main Nov 28, 2022
@mattsains mattsains deleted the 6591 branch November 30, 2022 16:27
jaronoff97 pushed a commit to lightstep/opentelemetry-collector that referenced this pull request Dec 14, 2022
jaronoff97 pushed a commit to lightstep/opentelemetry-collector that referenced this pull request Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error messages from otel builder inappropriately quoted/escaped
3 participants