Skip to content

context, storagedriver: trace function calls to Base storage driver - #343

Merged
RichardScothern merged 3 commits into
distribution:masterfrom
stevvooe:tracing-driver
Apr 10, 2015
Merged

RichardScothern merged 3 commits into
distribution:masterfrom
stevvooe:tracing-driver

Conversation

@stevvooe

Copy link
Copy Markdown
Collaborator

This adds WithTrace function to the context package that allows users to trace a time span between a trace allocation and returned function call. The resulting context includes ids that will allow for future dapper-like analysis. Please see the godoc addition for details.

This supports tracing calls to backend storage drivers.

This also moves the instance id out of the app so that it is associated with an instantiation of the runtime. The instance id is stored on the background context. This allows allow contexts using the main background context to include an instance id for log messages. It also simplifies the application slightly

This moves the instance id out of the app so that it is associated with an
instantiation of the runtime. The instance id is stored on the background
context. This allows allow contexts using the main background context to
include an instance id for log messages. It also simplifies the application
slightly.

Signed-off-by: Stephen J Day <[email protected]>
@dmp42

dmp42 commented Apr 10, 2015

Copy link
Copy Markdown
Contributor

ping @aluzzardi @icecrime @jfrazelle @mavenugo

Should we share that kind of stuff?

Comment thread context/trace.go Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

speeling.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just think you don't know what a "funciton" is.

@dmcgowan

Copy link
Copy Markdown
Collaborator

Given there is nothing in between info and debug, I would say Info is appropriate for such "chatty" logs.

LGTM

@stevvooe

Copy link
Copy Markdown
Collaborator Author

@dmcgowan Well, I was debating whether debug or info was correct. We'll go with this for now and see if it is too much. Maybe we can get @sirupsen to add a Trace level for this use.

@RichardScothern

Copy link
Copy Markdown

lgtm

This adds WithTrace function to the context package that allows users to trace
a time span between a trace allocation and returned function call. The
resulting context includes ids that will allow for future dapper-like analysis.

Please see the godoc addition for details.

Signed-off-by: Stephen J Day <[email protected]>
RichardScothern pushed a commit that referenced this pull request Apr 10, 2015
context, storagedriver: trace function calls to Base storage driver
@RichardScothern
RichardScothern merged commit 90af0f9 into distribution:master Apr 10, 2015
@stevvooe
stevvooe deleted the tracing-driver branch April 10, 2015 23:56
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Apr 22, 2021
context, storagedriver: trace function calls to Base storage driver
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Jan 19, 2022
context, storagedriver: trace function calls to Base storage driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants