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

feat(otlp-exporter): add timeout env var #2738

Merged
merged 82 commits into from
May 11, 2022
Merged
Changes from 2 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
4e81f83
feat(otlp-exporter): add timeout env var
svetlanabrennan Jan 24, 2022
11ea770
feat(otlp-exporter): add timeout env var test
svetlanabrennan Jan 25, 2022
a9a526f
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Jan 26, 2022
4f659fb
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Jan 26, 2022
2bc61e4
feat(otlp-exporter): add trace_timeout env var
svetlanabrennan Jan 26, 2022
48a25d7
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Jan 26, 2022
da3211f
feat(otlp-exporter): add how timeout is selected
svetlanabrennan Jan 26, 2022
0c1011d
feat(otlp-exporter): add negative value check to env vars
svetlanabrennan Jan 27, 2022
ed4079f
feat(otlp-exporter): add negative value check to env vars
svetlanabrennan Jan 27, 2022
fc486a1
feat(otlp-exporter): add timeout config information to readme
svetlanabrennan Jan 28, 2022
7292244
feat(otlp-exporter): add const var for default timeout value
svetlanabrennan Jan 28, 2022
ca98326
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Jan 31, 2022
5e7d2f5
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Jan 31, 2022
e8dc21b
feat(otlp-exporter): refactor code based on feedback
svetlanabrennan Feb 1, 2022
6c3a42d
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Feb 1, 2022
111cb83
feat(otlp-exporter): move configuring timeout to utils and tests
svetlanabrennan Feb 3, 2022
bbb75cb
feat(otlp-exporter): add timeout to http and xhr request
svetlanabrennan Feb 8, 2022
8866035
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Feb 8, 2022
b8543c0
Fix typo in environment.ts
svetlanabrennan Feb 8, 2022
3873a85
feat(otlp-exporter): update timeout to general timers
svetlanabrennan Feb 14, 2022
1fe1847
feat(otlp-exporter): update node http timeout tests
svetlanabrennan Feb 15, 2022
a207d50
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Feb 15, 2022
991beeb
feat(otlp-exporter): fix dependency version for http exporter
svetlanabrennan Feb 15, 2022
4e5af76
feat(otlp-exporter): add grpc deadline test
svetlanabrennan Feb 15, 2022
b27ca5f
feat(otlp-exporter): fix typos
svetlanabrennan Feb 15, 2022
a428d9d
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Feb 17, 2022
21f596e
feat(otlp-exporter): add browser timeout test
svetlanabrennan Feb 18, 2022
3043e10
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Feb 18, 2022
d66cb4a
feat(otlp-exporter): fix lint errors
svetlanabrennan Feb 18, 2022
fd4406b
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Feb 18, 2022
d42991e
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Feb 23, 2022
c7fe6cc
Merge branch 'main' into add-exporter-timeout
Flarna Feb 24, 2022
10880be
feat(otlp-exporter): fix tests after main merge
svetlanabrennan Feb 25, 2022
3e8360d
feat(otlp-exporter): fix one test and lint on readme
svetlanabrennan Feb 26, 2022
481795d
feat(otlp-exporter): fix tests that call export method
svetlanabrennan Mar 1, 2022
e8db3dc
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 1, 2022
4f9a556
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 2, 2022
d9a665f
feat(otlp-exporter): update various items based on feedback
svetlanabrennan Mar 2, 2022
4222cc6
feat(otlp-exporter): add additional tests
svetlanabrennan Mar 2, 2022
0d9de49
feat(otlp-exporter): add two more tests
svetlanabrennan Mar 2, 2022
80c1b0a
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 10, 2022
eff3298
feat(otlp-exporter): add 1 more test
svetlanabrennan Mar 11, 2022
84aa2ec
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Mar 11, 2022
70ca58d
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 15, 2022
b00c3e6
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 16, 2022
83092e6
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 17, 2022
44eeb56
feat(otlp-exporter): add logic around request aborted after response …
svetlanabrennan Mar 24, 2022
cfeb182
feat(otlp-exporter): update grpc deadline calculation
svetlanabrennan Mar 24, 2022
8b6a005
feat(otlp-exporter): add real http request test to proto exporter
svetlanabrennan Mar 24, 2022
d955eac
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 24, 2022
5547628
feat(otlp-exporter): fix timeout test
svetlanabrennan Mar 24, 2022
bc6bb16
feat(otlp-exporter): fix grpc readme
svetlanabrennan Mar 24, 2022
f5309fd
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Mar 28, 2022
8c0eda7
Update packages/exporter-trace-otlp-http/src/platform/node/util.ts
svetlanabrennan Mar 28, 2022
5f24eb9
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Mar 28, 2022
7f103cb
feat(otlp-exporter): remove comment from sendWithHttp
svetlanabrennan Mar 31, 2022
1a3b0bf
Merge branch 'main' into add-exporter-timeout
rauno56 Apr 13, 2022
a9f6a9a
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Apr 19, 2022
f0055a0
feat(otlp-exporter): fix metric tests and add changelong
svetlanabrennan Apr 19, 2022
c79c521
feat(otlp-exporter): fix lint
svetlanabrennan Apr 19, 2022
d887480
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Apr 20, 2022
d18c587
feat(otlp-exporter): fix metric tests
svetlanabrennan Apr 20, 2022
d1ccc95
Merge branch 'add-exporter-timeout' of github.com:svetlanabrennan/ope…
svetlanabrennan Apr 20, 2022
b97a418
feat(otlp-exporter): fix proto tests
svetlanabrennan Apr 20, 2022
0b8f7da
feat(otlp-exporter): fix lint
svetlanabrennan Apr 20, 2022
f053d09
feat(otlp-exporter): Merge branch 'main' into add-exporter-timeout
svetlanabrennan Apr 21, 2022
78d4e93
feat(otlp-exporter): fix tests after main merge
svetlanabrennan Apr 22, 2022
f32b965
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Apr 25, 2022
0b4c617
Merge branch 'main' into add-exporter-timeout
Flarna Apr 26, 2022
e81f9dd
feat(otlp-exporter): fix lint
svetlanabrennan Apr 26, 2022
ae49cd3
Merge branch 'main' into add-exporter-timeout
svetlanabrennan Apr 27, 2022
828993e
Merge branch 'main' into add-exporter-timeout
vmarchaud Apr 30, 2022
dc647fd
Merge branch 'main' into add-exporter-timeout
svetlanabrennan May 5, 2022
fbaa457
feat(otlp-exporter): fix accidentally removed code after main merge
svetlanabrennan May 5, 2022
14ba7d3
feat(otlp-exporter): replace nextTick with queueMicroTask for browser…
svetlanabrennan May 9, 2022
1ebc461
feat(otlp-exporter): add more details to changelog item
svetlanabrennan May 9, 2022
27b2b86
Merge branch 'main' into add-exporter-timeout
svetlanabrennan May 9, 2022
b186cbf
Merge branch 'main' into add-exporter-timeout
svetlanabrennan May 10, 2022
511999a
feat(otlp-exporter): fix server timing issue in real http request tes…
svetlanabrennan May 10, 2022
b553759
feat(otlp-exporter): fix real http request tests
svetlanabrennan May 10, 2022
5da6ce2
feat(otlp-exporter): add comment to two ways of destroying request
svetlanabrennan May 11, 2022
6ee89b0
Merge branch 'main' into add-exporter-timeout
dyladan May 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/exporter-trace-otlp-http/src/OTLPExporterBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,23 @@ export abstract class OTLPExporterBase<
}

private _configureTimeout(timeoutMillis: number | undefined): number {
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
const timeout = this._selectATimeout();

return typeof timeoutMillis === 'number'
? timeoutMillis < 0
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
? this._invalidTimeout(timeoutMillis, timeout)
? this._invalidTimeout(timeoutMillis, 10000)
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
: timeoutMillis
: timeout;
: this._selectATimeout();
}

private _selectATimeout(): number {
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
const definedTimeout =
Number(process.env.OTEL_EXPORTER_OTLP_TRACES_TIMEOUT ||
process.env.OTEL_EXPORTER_OTLP_TIMEOUT);

return definedTimeout ? definedTimeout : getEnv().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT;
return definedTimeout
? definedTimeout < 0
? this._invalidTimeout(definedTimeout, 10000)
: definedTimeout
: getEnv().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT;
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
}

private _invalidTimeout(timeout: number, defaultTimeout: number): number {
svetlanabrennan marked this conversation as resolved.
Show resolved Hide resolved
Expand Down