@voxgig/sdkgen 4.51.0 → 4.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/cmp/ReadmeExplanation.js +5 -2
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +20 -6
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/helpers/optspec.js +2 -2
- package/dist/helpers/optspec.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aontu +1 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/audit.aontu +1 -1
- package/project/.sdk/model/feature/cache.aontu +1 -1
- package/project/.sdk/model/feature/clienttrack.aontu +1 -1
- package/project/.sdk/model/feature/cost.aontu +1 -1
- package/project/.sdk/model/feature/debug.aontu +1 -1
- package/project/.sdk/model/feature/idempotency.aontu +1 -1
- package/project/.sdk/model/feature/log.aontu +1 -1
- package/project/.sdk/model/feature/metrics.aontu +3 -1
- package/project/.sdk/model/feature/netsim.aontu +1 -1
- package/project/.sdk/model/feature/paging.aontu +4 -1
- package/project/.sdk/model/feature/proxy.aontu +1 -1
- package/project/.sdk/model/feature/ratelimit.aontu +3 -3
- package/project/.sdk/model/feature/rbac.aontu +1 -1
- package/project/.sdk/model/feature/retry.aontu +1 -1
- package/project/.sdk/model/feature/secrets.aontu +1 -1
- package/project/.sdk/model/feature/streaming.aontu +1 -1
- package/project/.sdk/model/feature/telemetry.aontu +2 -2
- package/project/.sdk/model/feature/test.aontu +1 -1
- package/project/.sdk/model/feature/timeout.aontu +1 -1
- package/project/.sdk/model/feature/validate.aontu +1 -1
- package/project/.sdk/src/cmp/c/TestClean_c.ts +12 -11
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +17 -10
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +18 -1
- package/project/.sdk/src/cmp/cpp/TestClean_cpp.ts +2 -1
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +30 -2
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +31 -12
- package/project/.sdk/src/cmp/elixir/TestClean_elixir.ts +2 -1
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +51 -15
- package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +17 -0
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +42 -2
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +42 -14
- package/project/.sdk/src/cmp/java/TestClean_java.ts +9 -4
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +21 -0
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +13 -8
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +26 -2
- package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/EntityListOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/EntityPatchOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +12 -5
- package/project/.sdk/src/cmp/kotlin/TestClean_kotlin.ts +9 -4
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +19 -0
- package/project/.sdk/src/cmp/lua/TestClean_lua.ts +2 -1
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +42 -5
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +44 -10
- package/project/.sdk/src/cmp/lua/utility_lua.ts +2 -1
- package/project/.sdk/src/cmp/ocaml/TestClean_ocaml.ts +2 -1
- package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +36 -21
- package/project/.sdk/src/cmp/perl/TestClean_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +21 -0
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +31 -12
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +33 -4
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +13 -6
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +25 -2
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +26 -12
- package/project/.sdk/src/cmp/rb/TestClean_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +23 -2
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +27 -11
- package/project/.sdk/src/cmp/rust/TestClean_rust.ts +14 -17
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +22 -2
- package/project/.sdk/src/cmp/scala/TestClean_scala.ts +11 -11
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +14 -0
- package/project/.sdk/src/cmp/swift/TestClean_swift.ts +11 -11
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +9 -0
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +24 -10
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +13 -8
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +26 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityCreateOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityListOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityLoadOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityPatchOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityRemoveOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityUpdateOp.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +12 -5
- package/project/.sdk/src/cmp/zig/TestClean_zig.ts +11 -11
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +17 -10
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +41 -6
- package/project/.sdk/tm/c/feature/metrics.c +7 -0
- package/project/.sdk/tm/c/feature/paging.c +231 -2
- package/project/.sdk/tm/c/feature/ratelimit.c +5 -9
- package/project/.sdk/tm/c/feature/retry.c +51 -4
- package/project/.sdk/tm/c/feature/streaming.c +2 -1
- package/project/.sdk/tm/c/feature/telemetry.c +19 -18
- package/project/.sdk/tm/c/feature/test.c +78 -54
- package/project/.sdk/tm/c/tests/feature_test.c +184 -0
- package/project/.sdk/tm/c/tests/primary_utility_test.c +2 -0
- package/project/.sdk/tm/c/utility/make_options.c +80 -9
- package/project/.sdk/tm/clojure/src/sdk/core.clj +31 -11
- package/project/.sdk/tm/clojure/src/sdk/features.clj +198 -70
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +70 -1
- package/project/.sdk/tm/cpp/core/types.hpp +137 -68
- package/project/.sdk/tm/cpp/feature/audit.hpp +6 -1
- package/project/.sdk/tm/cpp/feature/metrics.hpp +19 -0
- package/project/.sdk/tm/cpp/feature/paging.hpp +160 -2
- package/project/.sdk/tm/cpp/feature/ratelimit.hpp +18 -14
- package/project/.sdk/tm/cpp/feature/retry.hpp +46 -5
- package/project/.sdk/tm/cpp/feature/streaming.hpp +2 -1
- package/project/.sdk/tm/cpp/feature/telemetry.hpp +17 -10
- package/project/.sdk/tm/cpp/feature/test.hpp +63 -53
- package/project/.sdk/tm/cpp/test/feature_test.cpp +137 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +35 -5
- package/project/.sdk/tm/csharp/feature/AuditFeature.cs +8 -1
- package/project/.sdk/tm/csharp/feature/MetricsFeature.cs +23 -0
- package/project/.sdk/tm/csharp/feature/PagingFeature.cs +130 -3
- package/project/.sdk/tm/csharp/feature/RatelimitFeature.cs +26 -19
- package/project/.sdk/tm/csharp/feature/RetryFeature.cs +41 -7
- package/project/.sdk/tm/csharp/feature/StreamingFeature.cs +2 -1
- package/project/.sdk/tm/csharp/feature/TelemetryFeature.cs +11 -9
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +55 -67
- package/project/.sdk/tm/csharp/test/FeatureTest.cs +162 -0
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +89 -12
- package/project/.sdk/tm/elixir/lib/projectname/feature/metrics.ex +13 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/paging.ex +110 -5
- package/project/.sdk/tm/elixir/lib/projectname/feature/ratelimit.ex +6 -12
- package/project/.sdk/tm/elixir/lib/projectname/feature/retry.ex +33 -9
- package/project/.sdk/tm/elixir/lib/projectname/feature/streaming.ex +2 -1
- package/project/.sdk/tm/elixir/lib/projectname/feature/telemetry.ex +7 -7
- package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +52 -48
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +59 -35
- package/project/.sdk/tm/elixir/test/feature_test.exs +137 -0
- package/project/.sdk/tm/go/feature/audit_feature.go +1 -3
- package/project/.sdk/tm/go/feature/base_feature.go +11 -0
- package/project/.sdk/tm/go/feature/metrics_feature.go +14 -0
- package/project/.sdk/tm/go/feature/paging_feature.go +108 -2
- package/project/.sdk/tm/go/feature/ratelimit_feature.go +19 -17
- package/project/.sdk/tm/go/feature/retry_feature.go +81 -9
- package/project/.sdk/tm/go/feature/streaming_feature.go +2 -1
- package/project/.sdk/tm/go/feature/telemetry_feature.go +18 -11
- package/project/.sdk/tm/go/feature/test_feature.go +65 -55
- package/project/.sdk/tm/go/test/feature_corpus_test.go +209 -28
- package/project/.sdk/tm/go/test/feature_test.go +32 -0
- package/project/.sdk/tm/go/utility/make_options.go +111 -6
- package/project/.sdk/tm/java/core/SdkClient.java +43 -14
- package/project/.sdk/tm/java/feature/AuditFeature.java +5 -1
- package/project/.sdk/tm/java/feature/MetricsFeature.java +31 -0
- package/project/.sdk/tm/java/feature/PagingFeature.java +156 -2
- package/project/.sdk/tm/java/feature/RatelimitFeature.java +15 -13
- package/project/.sdk/tm/java/feature/RetryFeature.java +33 -6
- package/project/.sdk/tm/java/feature/StreamingFeature.java +2 -1
- package/project/.sdk/tm/java/feature/TelemetryFeature.java +17 -9
- package/project/.sdk/tm/java/feature/TestFeature.java +50 -63
- package/project/.sdk/tm/java/test/FeatureCorpusTest.java +170 -17
- package/project/.sdk/tm/java/utility/MakeOptions.java +128 -14
- package/project/.sdk/tm/js/src/feature/metrics/MetricsFeature.js +8 -3
- package/project/.sdk/tm/js/src/feature/paging/PagingFeature.js +99 -1
- package/project/.sdk/tm/js/src/feature/ratelimit/RatelimitFeature.js +5 -9
- package/project/.sdk/tm/js/src/feature/retry/RetryFeature.js +25 -3
- package/project/.sdk/tm/js/src/feature/streaming/StreamingFeature.js +2 -1
- package/project/.sdk/tm/js/src/feature/telemetry/TelemetryFeature.js +11 -6
- package/project/.sdk/tm/js/src/feature/test/TestFeature.js +38 -1
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +55 -6
- package/project/.sdk/tm/js/test/feature/Corpus.test.js +95 -25
- package/project/.sdk/tm/js/test/feature.test.js +14 -1
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +23 -10
- package/project/.sdk/tm/kotlin/feature/AuditFeature.kt +5 -1
- package/project/.sdk/tm/kotlin/feature/MetricsFeature.kt +22 -0
- package/project/.sdk/tm/kotlin/feature/PagingFeature.kt +125 -2
- package/project/.sdk/tm/kotlin/feature/RatelimitFeature.kt +16 -13
- package/project/.sdk/tm/kotlin/feature/RetryFeature.kt +36 -14
- package/project/.sdk/tm/kotlin/feature/StreamingFeature.kt +4 -0
- package/project/.sdk/tm/kotlin/feature/TelemetryFeature.kt +12 -10
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +45 -48
- package/project/.sdk/tm/kotlin/test/FeatureTest.kt +114 -0
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +83 -14
- package/project/.sdk/tm/lua/feature/debug_feature.lua +2 -3
- package/project/.sdk/tm/lua/feature/metrics_feature.lua +5 -0
- package/project/.sdk/tm/lua/feature/paging_feature.lua +143 -2
- package/project/.sdk/tm/lua/feature/ratelimit_feature.lua +5 -9
- package/project/.sdk/tm/lua/feature/retry_feature.lua +43 -5
- package/project/.sdk/tm/lua/feature/streaming_feature.lua +2 -1
- package/project/.sdk/tm/lua/feature/telemetry_feature.lua +18 -7
- package/project/.sdk/tm/lua/feature/test_feature.lua +60 -62
- package/project/.sdk/tm/lua/test/feature_test.lua +100 -3
- package/project/.sdk/tm/lua/utility/make_options.lua +55 -13
- package/project/.sdk/tm/ocaml/sdk_features.ml +286 -60
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +34 -11
- package/project/.sdk/tm/ocaml/test/t_feature.ml +72 -1
- package/project/.sdk/tm/perl/feature/debug_feature.pm +2 -2
- package/project/.sdk/tm/perl/feature/metrics_feature.pm +5 -0
- package/project/.sdk/tm/perl/feature/paging_feature.pm +139 -2
- package/project/.sdk/tm/perl/feature/ratelimit_feature.pm +5 -11
- package/project/.sdk/tm/perl/feature/retry_feature.pm +22 -4
- package/project/.sdk/tm/perl/feature/streaming_feature.pm +2 -0
- package/project/.sdk/tm/perl/feature/telemetry_feature.pm +17 -8
- package/project/.sdk/tm/perl/feature/test_feature.pm +45 -50
- package/project/.sdk/tm/perl/t/feature.t +2 -2
- package/project/.sdk/tm/perl/t/feature_corpus.t +126 -23
- package/project/.sdk/tm/perl/utility/make_options.pm +33 -10
- package/project/.sdk/tm/php/feature/MetricsFeature.php +8 -0
- package/project/.sdk/tm/php/feature/PagingFeature.php +128 -1
- package/project/.sdk/tm/php/feature/RatelimitFeature.php +5 -9
- package/project/.sdk/tm/php/feature/RetryFeature.php +27 -3
- package/project/.sdk/tm/php/feature/StreamingFeature.php +2 -1
- package/project/.sdk/tm/php/feature/TelemetryFeature.php +10 -7
- package/project/.sdk/tm/php/feature/TestFeature.php +55 -47
- package/project/.sdk/tm/php/test/FeatureCorpusTest.php +151 -16
- package/project/.sdk/tm/php/utility/MakeOptions.php +40 -13
- package/project/.sdk/tm/py/pkg/feature/metrics_feature.py +7 -0
- package/project/.sdk/tm/py/pkg/feature/paging_feature.py +86 -1
- package/project/.sdk/tm/py/pkg/feature/ratelimit_feature.py +13 -16
- package/project/.sdk/tm/py/pkg/feature/retry_feature.py +31 -6
- package/project/.sdk/tm/py/pkg/feature/streaming_feature.py +2 -1
- package/project/.sdk/tm/py/pkg/feature/telemetry_feature.py +10 -6
- package/project/.sdk/tm/py/pkg/feature/test_feature.py +56 -53
- package/project/.sdk/tm/py/pkg/utility/make_options.py +68 -20
- package/project/.sdk/tm/py/test/test_feature.py +11 -1
- package/project/.sdk/tm/py/test/test_feature_corpus.py +111 -16
- package/project/.sdk/tm/py-data/pkg/fetch.py +6 -3
- package/project/.sdk/tm/py-data/test/test_fetch.py +7 -4
- package/project/.sdk/tm/rb/feature/debug_feature.rb +2 -2
- package/project/.sdk/tm/rb/feature/metrics_feature.rb +8 -0
- package/project/.sdk/tm/rb/feature/paging_feature.rb +87 -1
- package/project/.sdk/tm/rb/feature/ratelimit_feature.rb +12 -16
- package/project/.sdk/tm/rb/feature/retry_feature.rb +19 -3
- package/project/.sdk/tm/rb/feature/streaming_feature.rb +2 -1
- package/project/.sdk/tm/rb/feature/telemetry_feature.rb +11 -6
- package/project/.sdk/tm/rb/feature/test_feature.rb +42 -49
- package/project/.sdk/tm/rb/test/feature_corpus_test.rb +108 -24
- package/project/.sdk/tm/rb/test/feature_test.rb +1 -1
- package/project/.sdk/tm/rb/utility/make_options.rb +32 -11
- package/project/.sdk/tm/rust/feature/audit.rs +2 -2
- package/project/.sdk/tm/rust/feature/metrics.rs +24 -1
- package/project/.sdk/tm/rust/feature/paging.rs +189 -3
- package/project/.sdk/tm/rust/feature/ratelimit.rs +5 -10
- package/project/.sdk/tm/rust/feature/retry.rs +59 -6
- package/project/.sdk/tm/rust/feature/streaming.rs +3 -2
- package/project/.sdk/tm/rust/feature/support.rs +4 -0
- package/project/.sdk/tm/rust/feature/telemetry.rs +22 -11
- package/project/.sdk/tm/rust/feature/test.rs +63 -57
- package/project/.sdk/tm/rust/tests/feature_test.rs +174 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +1 -0
- package/project/.sdk/tm/rust/utility/make_options.rs +122 -27
- package/project/.sdk/tm/scala/core/SdkClient.scala +45 -11
- package/project/.sdk/tm/scala/feature/AuditFeature.scala +6 -1
- package/project/.sdk/tm/scala/feature/MetricsFeature.scala +31 -1
- package/project/.sdk/tm/scala/feature/PagingFeature.scala +122 -2
- package/project/.sdk/tm/scala/feature/RatelimitFeature.scala +14 -11
- package/project/.sdk/tm/scala/feature/RetryFeature.scala +29 -7
- package/project/.sdk/tm/scala/feature/StreamingFeature.scala +2 -1
- package/project/.sdk/tm/scala/feature/TelemetryFeature.scala +12 -10
- package/project/.sdk/tm/scala/feature/TestFeature.scala +44 -44
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +41 -0
- package/project/.sdk/tm/scala/utility/Make.scala +96 -13
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/AuditFeature.swift +3 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/MetricsFeature.swift +20 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/PagingFeature.swift +102 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RatelimitFeature.swift +19 -13
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RetryFeature.swift +40 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/StreamingFeature.swift +2 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TelemetryFeature.swift +11 -9
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +55 -49
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +51 -13
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +111 -0
- package/project/.sdk/tm/ts/src/feature/metrics/MetricsFeature.ts +5 -0
- package/project/.sdk/tm/ts/src/feature/paging/PagingFeature.ts +99 -1
- package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +5 -9
- package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +25 -3
- package/project/.sdk/tm/ts/src/feature/streaming/StreamingFeature.ts +2 -1
- package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +11 -6
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +8 -7
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +57 -6
- package/project/.sdk/tm/ts/test/feature/Corpus.test.ts +95 -25
- package/project/.sdk/tm/ts/test/feature.test.ts +14 -1
- package/project/.sdk/tm/zig/core/utility.zig +107 -8
- package/project/.sdk/tm/zig/feature/metrics.zig +19 -0
- package/project/.sdk/tm/zig/feature/paging.zig +172 -4
- package/project/.sdk/tm/zig/feature/ratelimit.zig +5 -11
- package/project/.sdk/tm/zig/feature/retry.zig +41 -3
- package/project/.sdk/tm/zig/feature/streaming.zig +2 -0
- package/project/.sdk/tm/zig/feature/telemetry.zig +15 -9
- package/project/.sdk/tm/zig/feature/test.zig +56 -40
- package/project/.sdk/tm/zig/test/feature_test.zig +109 -0
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +2 -0
- package/project/sdkgen-package.json +1 -1
- package/src/cmp/ReadmeExplanation.ts +5 -2
- package/src/cmp/ReadmeFeatures.ts +21 -6
- package/src/helpers/optspec.ts +2 -2
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
import math
|
|
5
|
+
import threading
|
|
5
6
|
import time
|
|
6
7
|
|
|
7
8
|
from projectname_sdk.feature.base_feature import ProjectNameBaseFeature
|
|
@@ -24,6 +25,7 @@ class ProjectNameRatelimitFeature(ProjectNameBaseFeature):
|
|
|
24
25
|
self.options = {}
|
|
25
26
|
self.tokens = 0
|
|
26
27
|
self.last = 0
|
|
28
|
+
self._lock = threading.Lock()
|
|
27
29
|
|
|
28
30
|
def init(self, ctx, options):
|
|
29
31
|
self.client = ctx.client
|
|
@@ -55,23 +57,18 @@ class ProjectNameRatelimitFeature(ProjectNameBaseFeature):
|
|
|
55
57
|
rate = self.options.get("rate") or 5
|
|
56
58
|
burst = rate if self.options.get("burst") is None else self.options.get("burst")
|
|
57
59
|
|
|
58
|
-
# Refill
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
self.tokens
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
needed = 1 - self.tokens
|
|
70
|
-
wait_ms = int(math.ceil((needed / rate) * 1000))
|
|
71
|
-
self._track(ctx, wait_ms)
|
|
60
|
+
# Refill, then reserve this call's token before any wait: a negative
|
|
61
|
+
# count is the calls already queued, so overlapping calls pace in turn.
|
|
62
|
+
with self._lock:
|
|
63
|
+
now = self._now()
|
|
64
|
+
elapsed = now - self.last
|
|
65
|
+
self.last = now
|
|
66
|
+
self.tokens = min(burst, self.tokens + (elapsed / 1000.0) * rate) - 1
|
|
67
|
+
if self.tokens >= 0:
|
|
68
|
+
return
|
|
69
|
+
wait_ms = int(math.ceil((-self.tokens / rate) * 1000))
|
|
70
|
+
self._track(ctx, wait_ms)
|
|
72
71
|
self._sleep(wait_ms)
|
|
73
|
-
self.last = self._now()
|
|
74
|
-
self.tokens = 0
|
|
75
72
|
|
|
76
73
|
def _now(self):
|
|
77
74
|
now = self.options.get("now")
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
# ProjectName SDK retry feature
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
import calendar
|
|
4
5
|
import random
|
|
6
|
+
import re
|
|
5
7
|
import time
|
|
6
8
|
|
|
7
9
|
from projectname_sdk.feature.base_feature import ProjectNameBaseFeature
|
|
8
10
|
|
|
9
11
|
|
|
12
|
+
_MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
|
13
|
+
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
|
14
|
+
|
|
15
|
+
_IMF_FIXDATE = re.compile(
|
|
16
|
+
r"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), ([0-9]{2}) ([A-Z][a-z]{2}) ([0-9]{4}) "
|
|
17
|
+
r"([0-9]{2}):([0-9]{2}):([0-9]{2}) GMT")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# RFC 9110 Retry-After: delay-seconds or an IMF-fixdate, else None.
|
|
21
|
+
def retry_after_ms(value, now):
|
|
22
|
+
s = value.strip(" \t")
|
|
23
|
+
if re.fullmatch(r"[0-9]+", s):
|
|
24
|
+
return int(s) * 1000
|
|
25
|
+
m = _IMF_FIXDATE.fullmatch(s)
|
|
26
|
+
if m is None or m.group(2) not in _MONTHS:
|
|
27
|
+
return None
|
|
28
|
+
day, year, hour, minute, sec = (int(m.group(i)) for i in (1, 3, 4, 5, 6))
|
|
29
|
+
if day < 1 or day > 31 or hour > 23 or minute > 59 or sec > 60:
|
|
30
|
+
return None
|
|
31
|
+
month = _MONTHS.index(m.group(2)) + 1
|
|
32
|
+
at = calendar.timegm((year, month, day, hour, minute, sec, 0, 0, 0)) * 1000
|
|
33
|
+
return max(0, at - now)
|
|
34
|
+
|
|
35
|
+
|
|
10
36
|
# Automatic retry of transient failures with exponential backoff and
|
|
11
37
|
# jitter. Wraps the active transport so a single operation call may make
|
|
12
38
|
# several HTTP attempts. A failure is retryable when the transport returns
|
|
@@ -80,11 +106,13 @@ class ProjectNameRetryFeature(ProjectNameBaseFeature):
|
|
|
80
106
|
status = res.get("status") if isinstance(res, dict) else None
|
|
81
107
|
if not isinstance(status, (int, float)) or isinstance(status, bool):
|
|
82
108
|
return False
|
|
83
|
-
statuses = self.options.get("statuses")
|
|
109
|
+
statuses = self.options.get("statuses")
|
|
110
|
+
if statuses is None:
|
|
111
|
+
statuses = [408, 425, 429, 500, 502, 503, 504]
|
|
84
112
|
return int(status) in statuses
|
|
85
113
|
|
|
86
114
|
def _backoff(self, res, attempt, min_delay, max_delay, factor):
|
|
87
|
-
#
|
|
115
|
+
# A server-provided Retry-After wins over the computed backoff.
|
|
88
116
|
ra = self._retry_after(res)
|
|
89
117
|
if ra is not None:
|
|
90
118
|
return min(max_delay, ra)
|
|
@@ -105,10 +133,7 @@ class ProjectNameRetryFeature(ProjectNameBaseFeature):
|
|
|
105
133
|
break
|
|
106
134
|
if val is None:
|
|
107
135
|
return None
|
|
108
|
-
|
|
109
|
-
return float(val) * 1000
|
|
110
|
-
except (TypeError, ValueError):
|
|
111
|
-
return None
|
|
136
|
+
return retry_after_ms(str(val), time.time() * 1000)
|
|
112
137
|
|
|
113
138
|
def _sleep(self, ms):
|
|
114
139
|
if ms is None or ms <= 0:
|
|
@@ -36,8 +36,9 @@ class ProjectNameStreamingFeature(ProjectNameBaseFeature):
|
|
|
36
36
|
return
|
|
37
37
|
if not self._streamable(ctx):
|
|
38
38
|
return
|
|
39
|
+
# A failed result keeps no stream, so the entity's stream() raises its error.
|
|
39
40
|
result = ctx.result
|
|
40
|
-
if result is None:
|
|
41
|
+
if result is None or result.err is not None:
|
|
41
42
|
return
|
|
42
43
|
|
|
43
44
|
result.streaming = True
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# ProjectName SDK telemetry feature
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
import os
|
|
4
5
|
import time
|
|
5
6
|
|
|
6
7
|
from projectname_sdk.feature.base_feature import ProjectNameBaseFeature
|
|
@@ -21,7 +22,6 @@ class ProjectNameTelemetryFeature(ProjectNameBaseFeature):
|
|
|
21
22
|
self.active = True
|
|
22
23
|
self.client = None
|
|
23
24
|
self.options = {}
|
|
24
|
-
self.seq = 0
|
|
25
25
|
|
|
26
26
|
def init(self, ctx, options):
|
|
27
27
|
self.client = ctx.client
|
|
@@ -32,7 +32,6 @@ class ProjectNameTelemetryFeature(ProjectNameBaseFeature):
|
|
|
32
32
|
else:
|
|
33
33
|
self.active = False
|
|
34
34
|
|
|
35
|
-
self.seq = 0
|
|
36
35
|
|
|
37
36
|
client = self.client
|
|
38
37
|
if getattr(client, "_telemetry", None) is None:
|
|
@@ -119,13 +118,18 @@ class ProjectNameTelemetryFeature(ProjectNameBaseFeature):
|
|
|
119
118
|
idgen = self.options.get("idgen")
|
|
120
119
|
if callable(idgen):
|
|
121
120
|
return idgen(kind)
|
|
122
|
-
|
|
123
|
-
self.seq += 1
|
|
124
|
-
n = format(self.seq, "04x")
|
|
125
|
-
return ("t" if kind == "trace" else "s") + n.ljust(16, "0")
|
|
121
|
+
return _random_hex(16 if kind == "trace" else 8)
|
|
126
122
|
|
|
127
123
|
def _now(self):
|
|
128
124
|
now = self.options.get("now")
|
|
129
125
|
if callable(now):
|
|
130
126
|
return now()
|
|
131
127
|
return time.time() * 1000
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# W3C trace context: lowercase hex from the platform's random source, never all zeros.
|
|
131
|
+
def _random_hex(nbytes):
|
|
132
|
+
while True:
|
|
133
|
+
buf = os.urandom(nbytes)
|
|
134
|
+
if any(buf):
|
|
135
|
+
return buf.hex()
|
|
@@ -124,21 +124,8 @@ class ProjectNameTestFeature(ProjectNameBaseFeature):
|
|
|
124
124
|
if not isinstance(entmap, dict):
|
|
125
125
|
entmap = {}
|
|
126
126
|
|
|
127
|
-
# For single-entity ops (load, remove) with an empty explicit
|
|
128
|
-
# match, fall back to the id the entity client already knows from a
|
|
129
|
-
# prior create/load (in fctx.match / fctx.data). Mirrors the TS
|
|
130
|
-
# mock where param() resolves the id from that accumulated state.
|
|
131
|
-
def _resolve_match(explicit):
|
|
132
|
-
if isinstance(explicit, dict) and len(explicit) > 0:
|
|
133
|
-
return explicit
|
|
134
|
-
for src in (getattr(fctx, "match", None), getattr(fctx, "data", None)):
|
|
135
|
-
v = vs.getprop(src, "id") if src is not None else None
|
|
136
|
-
if v is not None and v != "__UNDEFINED__":
|
|
137
|
-
return {"id": v}
|
|
138
|
-
return {}
|
|
139
|
-
|
|
140
127
|
if op.name == "load":
|
|
141
|
-
args = test_self.build_args(fctx, op,
|
|
128
|
+
args = test_self.build_args(fctx, op, fctx.reqmatch)
|
|
142
129
|
found = vs.select(entmap, args)
|
|
143
130
|
ent = vs.getelem(found, 0)
|
|
144
131
|
if ent is None:
|
|
@@ -159,25 +146,7 @@ class ProjectNameTestFeature(ProjectNameBaseFeature):
|
|
|
159
146
|
return respond(200, out)
|
|
160
147
|
|
|
161
148
|
elif op.name == "update" or op.name == "patch":
|
|
162
|
-
|
|
163
|
-
# also contains the new field values, which would otherwise
|
|
164
|
-
# cause select to filter out the entity we want to update.
|
|
165
|
-
# When reqdata has no id, fall back to the id the entity
|
|
166
|
-
# client carries from a prior create/load (in fctx.match /
|
|
167
|
-
# fctx.data), mirroring the TS mock where param(ctx,'id')
|
|
168
|
-
# resolves from accumulated state.
|
|
169
|
-
update_match = {}
|
|
170
|
-
if isinstance(fctx.reqdata, dict):
|
|
171
|
-
if "id" in fctx.reqdata:
|
|
172
|
-
update_match["id"] = fctx.reqdata["id"]
|
|
173
|
-
alias_map = getattr(op, "alias_map", None)
|
|
174
|
-
if alias_map is not None:
|
|
175
|
-
alias_id = vs.getprop(alias_map, "id")
|
|
176
|
-
if alias_id is not None and alias_id in fctx.reqdata:
|
|
177
|
-
update_match[alias_id] = fctx.reqdata[alias_id]
|
|
178
|
-
if not update_match:
|
|
179
|
-
update_match = _resolve_match({})
|
|
180
|
-
args = test_self.build_args(fctx, op, update_match)
|
|
149
|
+
args = test_self.build_args(fctx, op, _record(fctx.reqdata))
|
|
181
150
|
found = vs.select(entmap, args)
|
|
182
151
|
ent = vs.getelem(found, 0)
|
|
183
152
|
if ent is None:
|
|
@@ -190,7 +159,7 @@ class ProjectNameTestFeature(ProjectNameBaseFeature):
|
|
|
190
159
|
return respond(200, out)
|
|
191
160
|
|
|
192
161
|
elif op.name == "remove":
|
|
193
|
-
args = test_self.build_args(fctx, op,
|
|
162
|
+
args = test_self.build_args(fctx, op, fctx.reqmatch)
|
|
194
163
|
found = vs.select(entmap, args)
|
|
195
164
|
ent = vs.getelem(found, 0)
|
|
196
165
|
# Remove only the first matched entity. If nothing matches,
|
|
@@ -336,25 +305,46 @@ class ProjectNameTestFeature(ProjectNameBaseFeature):
|
|
|
336
305
|
qand = []
|
|
337
306
|
q = {"`$AND`": qand}
|
|
338
307
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
308
|
+
ename = ctx.entity.get_name()
|
|
309
|
+
idfrom = vs.getpath(ctx.config, "entity." + ename + ".id.from")
|
|
310
|
+
if not isinstance(idfrom, dict):
|
|
311
|
+
idfrom = {}
|
|
312
|
+
|
|
313
|
+
names = list(vs.keysof(args) or []) if args is not None else []
|
|
314
|
+
|
|
315
|
+
# With no id in the call, the entity's held id (or composite parts) stands in.
|
|
316
|
+
if vs.getprop(args, "id") is None:
|
|
317
|
+
parts = vs.getpath(ctx.config, "entity." + ename + ".id.parts")
|
|
318
|
+
if not isinstance(parts, list):
|
|
319
|
+
parts = [] if opname == "list" else ["id"]
|
|
320
|
+
for part in parts:
|
|
321
|
+
pname = str(part)
|
|
322
|
+
if pname not in names and (_held(getattr(ctx, "match", None), pname) or
|
|
323
|
+
_held(getattr(ctx, "data", None), pname)):
|
|
324
|
+
names.append(pname)
|
|
325
|
+
|
|
326
|
+
for key in names:
|
|
327
|
+
is_id = (key == "id")
|
|
328
|
+
selected = vs.select(reqd, key)
|
|
329
|
+
is_reqd = not vs.isempty(selected)
|
|
330
|
+
|
|
331
|
+
if is_id or is_reqd:
|
|
332
|
+
v = ctx.utility.param(ctx, key)
|
|
333
|
+
ka = None
|
|
334
|
+
if op.alias is not None:
|
|
335
|
+
ka = vs.getprop(op.alias, key)
|
|
336
|
+
|
|
337
|
+
qor = [{key: v}]
|
|
338
|
+
if ka is not None and isinstance(ka, str):
|
|
339
|
+
qor.append({ka: v})
|
|
340
|
+
|
|
341
|
+
# An alternative, never a replacement: a seed keeping the
|
|
342
|
+
# parameter flat is still found.
|
|
343
|
+
kf = idfrom.get(key)
|
|
344
|
+
if isinstance(kf, str) and kf != key:
|
|
345
|
+
qor.append(_nest(kf, v))
|
|
346
|
+
|
|
347
|
+
qand.append({"`$OR`": qor})
|
|
358
348
|
|
|
359
349
|
q["`$AND`"] = qand
|
|
360
350
|
|
|
@@ -362,3 +352,16 @@ class ProjectNameTestFeature(ProjectNameBaseFeature):
|
|
|
362
352
|
ctx.ctrl.explain["test"] = {"query": q}
|
|
363
353
|
|
|
364
354
|
return q
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
def _held(src, key):
|
|
358
|
+
v = vs.getprop(src, key) if src is not None else None
|
|
359
|
+
return v is not None and v != "__UNDEFINED__"
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
# The value under a dotted record path, as a nested dict.
|
|
363
|
+
def _nest(path, value):
|
|
364
|
+
out = value
|
|
365
|
+
for key in reversed(path.split(".")):
|
|
366
|
+
out = {key: out}
|
|
367
|
+
return out
|
|
@@ -133,6 +133,11 @@ def make_options_util(ctx):
|
|
|
133
133
|
featureorder.append(name)
|
|
134
134
|
opts["feature"] = fmap
|
|
135
135
|
|
|
136
|
+
fdefaults = _feature_defaults(
|
|
137
|
+
config.get("feature") if isinstance(config, dict) else None, opts.get("feature"))
|
|
138
|
+
if fdefaults is not None:
|
|
139
|
+
opts["feature"] = fdefaults
|
|
140
|
+
|
|
136
141
|
# THE OPTION SPEC IS GENERATED, NOT WRITTEN HERE.
|
|
137
142
|
#
|
|
138
143
|
# `schema.OPTSPEC` is built from the model: `main.kit.optspec` for the
|
|
@@ -156,6 +161,7 @@ def make_options_util(ctx):
|
|
|
156
161
|
# ...) would contaminate every instance constructed after it.
|
|
157
162
|
merged = vs.merge([{}, vs.clone(cfgopts), opts])
|
|
158
163
|
try:
|
|
164
|
+
_refuse_stray_keys(merged, optspec)
|
|
159
165
|
validated = vs.validate(merged, optspec)
|
|
160
166
|
except Exception as err:
|
|
161
167
|
# The message quotes the offending value.
|
|
@@ -211,26 +217,27 @@ def make_options_util(ctx):
|
|
|
211
217
|
else:
|
|
212
218
|
opts["system"] = {"fetch": sys_fetch}
|
|
213
219
|
|
|
214
|
-
# Resolve the feature add-order: an explicit list order (above) wins
|
|
215
|
-
#
|
|
216
|
-
#
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
220
|
+
# Resolve the feature add-order: an explicit list order (above) wins, and
|
|
221
|
+
# the names it leaves out follow it test-first, then sorted, so the outcome
|
|
222
|
+
# is deterministic and `test` is the base transport of a map.
|
|
223
|
+
fmap = opts.get("feature")
|
|
224
|
+
names = sorted(n for n in fmap.keys() if n not in featureorder) \
|
|
225
|
+
if isinstance(fmap, dict) else []
|
|
226
|
+
if "test" in names:
|
|
227
|
+
rest = ["test"] + [n for n in names if n != "test"]
|
|
228
|
+
else:
|
|
229
|
+
rest = names
|
|
230
|
+
# Station special case, mirroring test's: its transport wrap must
|
|
231
|
+
# sit immediately outside the base transport (inside every other
|
|
232
|
+
# transport wrap), so map-form activation hoists it to just after
|
|
233
|
+
# test - or first, when no test entry exists. Without this the
|
|
234
|
+
# sorted default would init station last and wrap OUTSIDE the
|
|
235
|
+
# recording features, turning its wire-truth events into fiction.
|
|
236
|
+
if "station" in rest:
|
|
237
|
+
rest = [n for n in rest if n != "station"]
|
|
238
|
+
at = rest.index("test") + 1 if "test" in rest else 0
|
|
239
|
+
rest.insert(at, "station")
|
|
240
|
+
featureorder = featureorder + rest
|
|
234
241
|
|
|
235
242
|
opts["__derived__"] = {"featureorder": featureorder}
|
|
236
243
|
|
|
@@ -245,6 +252,24 @@ def make_options_util(ctx):
|
|
|
245
252
|
return opts
|
|
246
253
|
|
|
247
254
|
|
|
255
|
+
# The model's options for a feature sit beneath the caller's, key by key: a
|
|
256
|
+
# key the caller sets replaces the default whole, so a list is never merged.
|
|
257
|
+
def _feature_defaults(cfgfeature, feature):
|
|
258
|
+
if feature is not None and not isinstance(feature, dict):
|
|
259
|
+
return None
|
|
260
|
+
out = dict(feature or {})
|
|
261
|
+
for name, fdef in (cfgfeature if isinstance(cfgfeature, dict) else {}).items():
|
|
262
|
+
dflt = fdef.get("options") if isinstance(fdef, dict) else None
|
|
263
|
+
given = out.get(name)
|
|
264
|
+
if not isinstance(dflt, dict) or (given is None and dflt.get("active") is not True) \
|
|
265
|
+
or (given is not None and not isinstance(given, dict)):
|
|
266
|
+
continue
|
|
267
|
+
merged = vs.clone(dflt)
|
|
268
|
+
merged.update(given or {})
|
|
269
|
+
out[name] = merged
|
|
270
|
+
return out
|
|
271
|
+
|
|
272
|
+
|
|
248
273
|
# A feature's name is not a field name: only the sensitive names inside its
|
|
249
274
|
# settings count, so `secrets` does not make every setting a secret. Entity
|
|
250
275
|
# blocks (per-entity settings, seeded records) hold no credential, and nor do
|
|
@@ -270,3 +295,26 @@ def _plain(block, name):
|
|
|
270
295
|
omit = ("entity", "rules") if "rbac" == name else ("entity",)
|
|
271
296
|
return {k: v for k, v in block.items() if k not in omit}
|
|
272
297
|
return block
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# Before validate: the struct's own refusal prints the value without its
|
|
301
|
+
# functions, so a misspelled callback key would go unnamed.
|
|
302
|
+
def _refuse_stray_keys(opts, optspec):
|
|
303
|
+
fspecs = optspec.get("feature") if isinstance(optspec, dict) else None
|
|
304
|
+
feature = opts.get("feature") if isinstance(opts, dict) else None
|
|
305
|
+
if not isinstance(fspecs, dict) or not isinstance(feature, dict):
|
|
306
|
+
return
|
|
307
|
+
for name, fopts in feature.items():
|
|
308
|
+
spec = _spec_map(fspecs.get(name))
|
|
309
|
+
if spec is None or spec.get("`$OPEN`") or not isinstance(fopts, dict):
|
|
310
|
+
continue
|
|
311
|
+
stray = [k for k in fopts if k not in spec]
|
|
312
|
+
if stray:
|
|
313
|
+
raise ValueError("Unexpected keys at field feature." + name + ": " + ", ".join(stray))
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def _spec_map(spec):
|
|
317
|
+
if isinstance(spec, list):
|
|
318
|
+
start = 2 if spec and "`$NOF`" == spec[0] else 0
|
|
319
|
+
return next((a for a in spec[start:] if isinstance(a, dict)), None)
|
|
320
|
+
return spec if isinstance(spec, dict) else None
|
|
@@ -544,6 +544,14 @@ class TestMetricsFeature:
|
|
|
544
544
|
assert metrics["total"]["err"] == 1
|
|
545
545
|
assert metrics["ops"]["widget.load"]["count"] == 2
|
|
546
546
|
|
|
547
|
+
def test_sink_gets_the_counters_once_per_operation(self):
|
|
548
|
+
seen = []
|
|
549
|
+
h = make_client([{"name": "metrics", "options": {"sink": seen.append}}])
|
|
550
|
+
h.op(op="load")
|
|
551
|
+
h.op(op="list")
|
|
552
|
+
assert [m["total"]["count"] for m in seen] == [1, 2]
|
|
553
|
+
assert seen[1]["ops"]["widget.list"]["count"] == 1
|
|
554
|
+
|
|
547
555
|
def test_injected_clock_records_duration(self):
|
|
548
556
|
clock = make_clock()
|
|
549
557
|
|
|
@@ -619,7 +627,9 @@ class TestTelemetryFeature:
|
|
|
619
627
|
def test_default_id_generation_and_no_exporter(self):
|
|
620
628
|
h = make_client([{"name": "telemetry"}])
|
|
621
629
|
h.op(op="load")
|
|
622
|
-
|
|
630
|
+
span = h.client._telemetry["spans"][0]
|
|
631
|
+
assert re.fullmatch(r"[0-9a-f]{32}", span["traceId"]) and span["traceId"].strip("0")
|
|
632
|
+
assert re.fullmatch(r"[0-9a-f]{16}", span["spanId"]) and span["spanId"].strip("0")
|
|
623
633
|
|
|
624
634
|
def test_inactive_telemetry_records_nothing(self):
|
|
625
635
|
h = make_client([{"name": "telemetry", "options": {"active": False}}])
|