-
Notifications
You must be signed in to change notification settings - Fork 326
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
[o11y] Add KV span tags #3261
base: main
Are you sure you want to change the base?
[o11y] Add KV span tags #3261
Conversation
04c7f43
to
076a736
Compare
jsg::Promise<GetResult> get(jsg::Lock& js, | ||
kj::String name, | ||
jsg::Optional<kj::OneOf<kj::String, GetOptions>> options, | ||
CompatibilityFlags::Reader flags); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor cleanup: compat flags parameter is not needed here, that should simplify the generated code slightly.
076a736
to
0d0a53f
Compare
0d0a53f
to
e182c52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequences of very similar literals are not the best, otherwise lg.
src/workerd/api/r2-bucket.c++
Outdated
@@ -439,7 +460,8 @@ jsg::Promise<kj::Maybe<jsg::Ref<R2Bucket::HeadResult>>> R2Bucket::put(jsg::Lock& | |||
}); | |||
|
|||
auto& context = IoContext::current(); | |||
auto client = context.getHttpClient(clientIndex, true, kj::none, "r2_put"_kjc); | |||
auto client = r2GetClient(context, clientIndex, "r2_put"_kjc, "PutObject"_kjc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that calling the original function with initializer in-place wouldn't increase code amount much (maybe couple lines in total), but would be much more readable:
auto client = r2GetClient(context, clientIndex, { { "rpc.method"_kjc, "PutObject"_kjc} ... }
because currrently it is very hard to tell what is r2_put
and what is PutObject
and what is the difference.
e182c52
to
b48a847
Compare
The generated output of Full Type Diffdiff -r bazel-bin/types/definitions/experimental/index.d.ts types/generated-snapshot/experimental/index.d.ts
1680c1680
< cache?: "no-store" | "no-cache";
---
> cache?: "no-store";
1694c1694
< cache?: "no-store" | "no-cache";
---
> cache?: "no-store";
diff -r bazel-bin/types/definitions/experimental/index.ts types/generated-snapshot/experimental/index.ts
1688c1688
< cache?: "no-store" | "no-cache";
---
> cache?: "no-store";
1702c1702
< cache?: "no-store" | "no-cache";
---
> cache?: "no-store"; |
#3256 needs to land first.