-
Notifications
You must be signed in to change notification settings - Fork 909
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
runtime/trace: stub more functions #4570
base: dev
Are you sure you want to change the base?
Conversation
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.
Can you run go fmt
on src/runtime/trace/trace.go`? The CI complains that it is not correctly formatted (probably because of the missing newline at the end of the file).
Other than that and the comment below, LGTM.
src/runtime/trace/trace.go
Outdated
|
||
func Logf(ctx context.Context, category, format string, args ...any) {} | ||
|
||
func WithRegion(ctx context.Context, regionType string, fn func()) {} |
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 don't think this is correct. The documentation says:
WithRegion starts a region associated with its calling goroutine, runs fn, and then ends the region.
So even if we don't implement tracing, I think WithRegion
should at least call fn
.
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.
Good call, I've adjusted the function to call the passed in fn
, thanks!
2ab77f1
to
1852997
Compare
Signed-off-by: Joonas Bergius <[email protected]>
1852997
to
82d45f2
Compare
Force push seems to have done the trick 👍 |
I came across the following error while I was looking at using the opentelemetry libraries with TinyGo:
I thought it would be nice to have these functions stubbed out so that it would be possible to get further along with libraries that might try to make use of these
runtime/trace
functions, if for no other reason than to be able to use thego:linkname
directive to do something else with them.