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

Add node and browser sdk transport option docs #5740

Merged
merged 4 commits into from Nov 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 29 additions & 6 deletions src/platforms/common/configuration/options.mdx
Expand Up @@ -47,10 +47,10 @@ Specifies whether to use global scope management mode. Should be `true` for clie

Example scenarios where it should be explicitly set to true:

* Universal Windows platform (UWP) applications
* WinForms applications
* Windows Presentation Foundation (WPF) applications
* Single user console applications
- Universal Windows platform (UWP) applications
- WinForms applications
- Windows Presentation Foundation (WPF) applications
- Single user console applications

Defaults to `false`, unless in Blazor WASM, MAUI, Unity, or Xamarin where the default is `true`.

Expand Down Expand Up @@ -577,13 +577,36 @@ Switches out the transport used to send events. How this works depends on the SD

</ConfigKey>

<ConfigKey name="http-proxy" supported={["node", "php", "python", "java", "dotnet", "rust"]}>
<ConfigKey name="transport-options" supported={["javascript", "node"]}>

Options used to configure the transport. This is an object with the following possible optional keys:

<PlatformSection supported={["node"]}>

- `headers`: An object containing headers to be sent with every request.
- `proxy`: A proxy used for outbound requests. Can be http or https.
- `caCerts`: A single or list of a path to a file or directory, or a buffer of CA certificates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit unclear. A single cert or a single path?

Suggested change
- `caCerts`: A single or list of a path to a file or directory, or a buffer of CA certificates
- `caCerts`: A single or list of a path to a file or directory, or a buffer of CA certificates

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be:

  • a path to a CA certificate
  • a list of paths to a CA certificate
  • a buffer of CA certificates

AbhiPrasad marked this conversation as resolved.
Show resolved Hide resolved
- `httpModule`: A custom HTTP module to use for requests. Defaults to the the native `http` and `https` modules.
- `keepAlive`: Whether to keep the socket alive between requests. Defaults to `false`.
AbhiPrasad marked this conversation as resolved.
Show resolved Hide resolved

</PlatformSection>

<PlatformSection supported={["javascript"]}>

- `headers`: An object containing headers to be sent with every request. Used by the SDK's fetch and XHR transports.
- `fetchOptions`: An object containing options to be passed to the `fetch` call. Used by the SDK's fetch transport.

</PlatformSection>
AbhiPrasad marked this conversation as resolved.
Show resolved Hide resolved

</ConfigKey>

<ConfigKey name="http-proxy" supported={["php", "python", "java", "dotnet", "rust"]}>

When set, a proxy can be configured that should be used for outbound requests. This is also used for HTTPS requests unless a separate `https-proxy` is configured. However, not all SDKs support a separate HTTPS proxy. SDKs will attempt to default to the system-wide configured proxy, if possible. For instance, on Unix systems, the `http_proxy` environment variable will be picked up.

</ConfigKey>

<ConfigKey name="https-proxy" supported={["python", "node", "rust"]}>
<ConfigKey name="https-proxy" supported={["python", "rust"]}>

Configures a separate proxy for outgoing HTTPS requests. This value might not be supported by all SDKs. When not supported the `http-proxy` value is also used for HTTPS requests at all times.

Expand Down