Skip to content

[crashtracker] Better way to pass timeouts to receiver #717

@danielsn

Description

@danielsn
          Right--this one is hard.

Two failed ideas from my side.

  1. The receiver code actually doesn't have control over the acquisition of its own args and it'd be a weird change to the entrypoint to make a new args struct required. So not a great choice of arg propagation.
  2. Relying on the receiver configuration means waiting a few steps into the IPC sequence, which is not only weird but incorrect. I think I suggested this at one point, but I see how naive that was.

That really leaves the environment as the dominant way of passing this configuration.

With that in mind, some thoughts. I think the first two are constructive and the last is speculative.

First, we should probably by the naming that has been determined elsewhere. All the runtimes are using the CRASHTRACKING label instead of CRASHTRACKER.

Second, how do you feel about marking this "private' (prepending one or two _ to the name)? End-users probably shouldn't be passing this. They should be using whatever configuration levers are provided by their library, and the library should pass this.

Third, here's an idea for tightening the interface. We could take a new option in the ReceiverConfig and then propagate it to the receiver's environment in make_receiver as part of the Prepared Args.

To sketch out that idea,

  1. impl PreparedExecve would have a new fn new_with_env(config: &CrashtrackerReceiverConfig, env: Option<Vec<String, String>>) interface
  2. Merge config.env and env (this other vec) in the PreparedExecve new_with_env, with the env coming last (winner-take-all in case of conflict).

Originally posted by @sanchda in #702 (comment)

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