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

[agent-base] Allow for never relying on stack trace #170

Merged
merged 3 commits into from
May 15, 2023

Conversation

TooTallNate
Copy link
Owner

During an HTTP request, if opts.protocol is set, then use that to determine the secureEndpoint value. Coupling that with an explicitly set agent.protocol in the instance (essentially "locking" it for use with either http or https module), then the agent will never rely on the stack trace. By default it will still rely on the stack trace to allow for agent instances to be used with either http or https modules.

Also moved the internal props to an object using a symbol, instead of relying on underscore props.

Fixes #158.

During an HTTP request, if `opts.protocol` is set, then use that to
determine the `secureEndpoint` value. Coupling that with an explicitly
set `agent.protocol` in the instance (essentially "locking" it for use
with either `http` or `https` module), then the agent will _never_ rely
on the stack trace. By default it will still rely on the stack trace to
allow for agent instances to be used with either `http` or `https`
modules.

Also moved the internal props to an object using a symbol, instead of
relying on underscore props.

Fixes #158.
@changeset-bot
Copy link

changeset-bot bot commented May 15, 2023

🦋 Changeset detected

Latest commit: b2df98c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agent-base Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview May 15, 2023 9:09pm

@TooTallNate TooTallNate merged commit 66b4c63 into main May 15, 2023
@TooTallNate TooTallNate deleted the agent-base-internal-state-less-call-stack branch May 15, 2023 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't depend on stack trace format
1 participant