code: func WithModule(ctx context.Context, module string) context.Context {
  	parent := GetModulePath(ctx)
  
  	if parent != "" {
  		// don't re-append module when module is the same.
  		if path.Base(parent) == module {
  			return ctx
  		}
  
  		module = path.Join(parent, module)
  	}
  
  	ctx = WithLogger(ctx, GetLogger(ctx).WithField("module", module))
  	return context.WithValue(ctx, moduleKey{}, module)
  }
docs: // WithModule adds the module to the context, appending it with a slash if a
  // module already exists. A module is just a roughly correlated defined by the
  // call tree for a given context.
  //
  // As an example, we might have a "node" module already part of a context. If
  // this function is called with "tls", the new value of module will be
  // "node/tls".
  //
  // Modules represent the call path. If the new module and last module are the
  // same, a new module entry will not be created. If the new module and old
  // older module are the same but separated by other modules, the cycle will be
  // represented by the module path.