Carlo Alberto Ferraris

Results 78 comments of Carlo Alberto Ferraris

@martisch i wouldn't add goroutines to the mix. There are legitimate use cases (rollback/cleanup operations that can run in a `defer` or inside an `if err != nil {}` being...

> values stored in a Context, such as logging or tracing entries, may be scoped to a specific call or operation and flushed or finalized at the end of that...

> > Do we have any actual example of this need? > > * [`golang.org/x/net/trace.Trace`](https://pkg.go.dev/golang.org/x/net/trace?tab=doc#Trace) > * [`go.opencensus.io/trace.Span`](https://pkg.go.dev/go.opencensus.io/trace?tab=doc#Span) > * [`github.com/Azure/go-autorest/tracing`](https://pkg.go.dev/github.com/Azure/go-autorest/tracing?tab=doc) > * [`gopkg.in/DataDog/dd-trace-go.v1/ddtrace.Span`](https://pkg.go.dev/gopkg.in/DataDog/dd-trace-go.v1/ddtrace?tab=doc#Span) (via [`gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer.StartSpanFromContext`](https://pkg.go.dev/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer?tab=doc#StartSpanFromContext)) > * [`github.com/rs/zerolog.Logger`](https://pkg.go.dev/github.com/rs/zerolog?tab=doc#Logger)(via [`github.com/rs/zerolog.Ctx`](https://pkg.go.dev/github.com/rs/zerolog?tab=doc#Ctx))...

> I think we have pretty solid evidence that using a context asynchronously is _incorrect_, or at least error-prone To advance the conversation it would be ideal to have the...

@rsc this has been sitting here for 2+ years now, any chance to bring it up for review? People keep on hitting the problems listed above, and the copy-pasting is...

@rsc yes, summarizing: # Rationale It is quite common to need the values attached to a `Context` be available for processing rollback, cleanup, and/or observability tasks after the `Context` itself...

Just as an input for discussion, this is the allocation framegraph for an API gateway in our system, as you can see almost half of the allocations are due to...

> > We want to perform different telemetry actions (logging, metrics) depending on whether the error was generated by the client or the server. > > I'd suggest explaining a...

See https://github.com/golang/go/issues/27801 though

In #56172 AFAICT the consensus was that the copy operation should attempt to use FICLONE (or equivalent) whenever possible; this does not currently seem to be captured in this superseding...