Use module_function in Banzai::Renderer
Using `extend self` prevents GitLab Performance Monitoring from being able to track class methods. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23347
This commit is contained in:
parent
fd2b79b664
commit
c5bf8e362c
|
@ -14,6 +14,7 @@ v 8.13.0 (unreleased)
|
||||||
- Add an example for testing a phoenix application with Gitlab CI in the docs (Manthan Mallikarjun)
|
- Add an example for testing a phoenix application with Gitlab CI in the docs (Manthan Mallikarjun)
|
||||||
- Updating verbiage on git basics to be more intuitive
|
- Updating verbiage on git basics to be more intuitive
|
||||||
- Clarify documentation for Runners API (Gennady Trafimenkov)
|
- Clarify documentation for Runners API (Gennady Trafimenkov)
|
||||||
|
- The instrumentation for Banzai::Renderer has been restored
|
||||||
- Change user & group landing page routing from /u/:username to /:username
|
- Change user & group landing page routing from /u/:username to /:username
|
||||||
- Prevent running GfmAutocomplete setup for each diff note !6569
|
- Prevent running GfmAutocomplete setup for each diff note !6569
|
||||||
- Added documentation for .gitattributes files
|
- Added documentation for .gitattributes files
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module Banzai
|
module Banzai
|
||||||
module Renderer
|
module Renderer
|
||||||
extend self
|
module_function
|
||||||
|
|
||||||
# Convert a Markdown String into an HTML-safe String of HTML
|
# Convert a Markdown String into an HTML-safe String of HTML
|
||||||
#
|
#
|
||||||
|
@ -141,8 +141,6 @@ module Banzai
|
||||||
end.html_safe
|
end.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def cacheless_render(text, context = {})
|
def cacheless_render(text, context = {})
|
||||||
Gitlab::Metrics.measure(:banzai_cacheless_render) do
|
Gitlab::Metrics.measure(:banzai_cacheless_render) do
|
||||||
result = render_result(text, context)
|
result = render_result(text, context)
|
||||||
|
|
Loading…
Reference in New Issue