8000 SoftFail after span closure masks exec failure · Issue #360 · equinix-labs/otel-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
SoftFail after span closure masks exec failure #360
Open
@mechie

Description

@mechie

If config.SoftFail is called after an exec has finished (e.g. due to the OTel collector returning a non-compliant header), otel-cli will return 0 (or 1, if --fail/OTEL_CLI_FAIL=true), masking any failures in the underlying operation.

Instead, it should probably do something like:

        # exitCode could be a parameter, or come from a helper that fetches it?
	if c.Fail {
		os.Exit(exitCode | 1)  // or just `1`?
	} else {
		os.Exit(exitCode)
	}

Otherwise, otel-cli should probably make clear that its surfacing of the operation's return code is incidental, maybe provide some alternative method of surfacing it (export an OTEL_CLI_LAST_RC?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0