[openstack-dev] [oslo] oslo.context and name fields
me at ronaldbradford.com
Tue Apr 5 19:39:21 UTC 2016
I cannot speak to historically why there were not there, but I am working
through the app-agnostic-logging-parameters blueprint  right now and
it's very related to this. As part of this work I would be reviewing
attributes that are more commonly used in subclassed context objects for
inclusion into the base oslo.context class, a step before a more kwargs
init() approach that many subclassed context object utilize now.
I am also proposing the standardization of context arguments 
(specifically ids), and names are not mentioned but I would like to follow
the proposed convention.
However, as you point out in the middleware , if the information is
already available I see no reason not to facilite the base oslo.context
class to consume this for subsequent use by logging. FYI the
get_logging_values() work in  is specially to add logging only values
and this can be the first use case.
While devstack uses these logging format string options, the defaults
(which I presume are operator centric do not). One of my goals of the
Austin Ops summit it to get to talk with actual operators and find out what
is really in use. Regardless, the capacity to choose should be available
when possible if the information is already identified without subsequent
On Tue, Apr 5, 2016 at 2:31 PM, Sean Dague <sean at dague.net> wrote:
> I was trying to clean up the divergent logging definitions in devstack
> as part of scrubbing out 'tenant' references -
> https://review.openstack.org/#/c/301801/ and in doing so stumbled over
> the fact that the extremely useful project_name and user_name fields are
> not in base oslo.context.
> These are always available to be set -
> And they are extremely valuable when a human is looking at logs, as you
> actually can remember names when looking at various services to cross
> reference things. Nova has a custom context that sets these things -
> I would really like these to be available in all services using
> So the question is, were these not implemented on purpose? Is the
> opposition to putting them into oslo.context?
> Please let me know before I start going down this path.
> Sean Dague
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev