<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/config/initializers/metrics.rb, branch multi-line-inline-diff</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Instrument Rinku usage</title>
<updated>2016-07-04T10:20:57+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-07-04T10:20:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=90dc6f1211ab1a9d10c6799d90310dde79581d62'/>
<id>90dc6f1211ab1a9d10c6799d90310dde79581d62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab</title>
<updated>2016-07-01T10:34:28+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-07-01T09:16:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=521454831ee9e899e046ed288596865df55e8832'/>
<id>521454831ee9e899e046ed288596865df55e8832</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Support for rendering/redacting multiple documents</title>
<updated>2016-06-24T09:46:39+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-06-21T11:35:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d470f3d1954a33d2ea6069fadcbb9810267b024f'/>
<id>d470f3d1954a33d2ea6069fadcbb9810267b024f</id>
<content type='text'>
This commit changes the way certain documents are rendered (currently
only Notes) and how documents are redacted. Previously both rendering
and redacting would run on a per document basis. The result of this was
that for every document we'd have to run countless queries just to
figure out if we could display a set of links or not.

This commit changes things around so that redacting Markdown documents
is no longer tied into the html-pipeline Gem. This in turn allows it to
redact multiple documents in a single pass, thus reducing the number of
queries needed.

In turn rendering issue/merge request notes has been adjusted to take
advantage of this new setup. Instead of rendering Markdown somewhere
deep down in a view the Markdown is rendered and redacted in the
controller (taking the current user and all that into account). This has
been done in such a way that the "markdown()" helper method can still be
used on its own.

This particular commit also paves the way for caching rendered HTML on
object level. Right now there's an accessor method Note#note_html which
is used for setting/getting the rendered HTML. Once we cache HTML on row
level we can simply change this field to be a column and call a "save"
whenever needed and we're pretty much done.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit changes the way certain documents are rendered (currently
only Notes) and how documents are redacted. Previously both rendering
and redacting would run on a per document basis. The result of this was
that for every document we'd have to run countless queries just to
figure out if we could display a set of links or not.

This commit changes things around so that redacting Markdown documents
is no longer tied into the html-pipeline Gem. This in turn allows it to
redact multiple documents in a single pass, thus reducing the number of
queries needed.

In turn rendering issue/merge request notes has been adjusted to take
advantage of this new setup. Instead of rendering Markdown somewhere
deep down in a view the Markdown is rendered and redacted in the
controller (taking the current user and all that into account). This has
been done in such a way that the "markdown()" helper method can still be
used on its own.

This particular commit also paves the way for caching rendered HTML on
object level. Right now there's an accessor method Note#note_html which
is used for setting/getting the rendered HTML. Once we cache HTML on row
level we can simply change this field to be a column and call a "save"
whenever needed and we're pretty much done.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '18451-track-new-redis-connections' into 'master'</title>
<updated>2016-06-15T09:56:42+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-06-15T09:56:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8249fdcd47b33c71e5f9908c0ac877487070e39d'/>
<id>8249fdcd47b33c71e5f9908c0ac877487070e39d</id>
<content type='text'>

Resolve "Track the number of new Redis connections per transaction"

## What does this MR do?

Add a new metric counter, `new_redis_connections`, that contains the number of calls to `Redis::Client#connect` in the current transaction.

## Are there points in the code the reviewer needs to double check?

Not sure. I tested this in kind of a brute-force way:

1. Add a debugger in the monkey-patched `connect` method.
2. With metrics enabled, start the app and load a page.
3. The first Redis connection is created by `Rack::Attack` and isn't in a transaction, but still works fine.
4. The second Redis connection is within a transaction (the page load), and increments the counter.
5. If I reload the page, neither debugger is hit.
6. If I use a Redis client and do `CLIENT KILL` on my two existing clients, then reload the page, I get 3 and 4 again.
7. If I disable metrics collection, the debugger never gets hit.

## Why was this MR needed?

We may have a Redis connection leak somewhere, so adding metrics will let us track this.

## What are the relevant issue numbers?

Closes #18451.

## Screenshots (if relevant)

Hahaha nope, not relevant.

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @yorickpeterse 

See merge request !4649</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Resolve "Track the number of new Redis connections per transaction"

## What does this MR do?

Add a new metric counter, `new_redis_connections`, that contains the number of calls to `Redis::Client#connect` in the current transaction.

## Are there points in the code the reviewer needs to double check?

Not sure. I tested this in kind of a brute-force way:

1. Add a debugger in the monkey-patched `connect` method.
2. With metrics enabled, start the app and load a page.
3. The first Redis connection is created by `Rack::Attack` and isn't in a transaction, but still works fine.
4. The second Redis connection is within a transaction (the page load), and increments the counter.
5. If I reload the page, neither debugger is hit.
6. If I use a Redis client and do `CLIENT KILL` on my two existing clients, then reload the page, I get 3 and 4 again.
7. If I disable metrics collection, the debugger never gets hit.

## Why was this MR needed?

We may have a Redis connection leak somewhere, so adding metrics will let us track this.

## What are the relevant issue numbers?

Closes #18451.

## Screenshots (if relevant)

Hahaha nope, not relevant.

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- [ ] Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @yorickpeterse 

See merge request !4649</pre>
</div>
</content>
</entry>
<entry>
<title>Track new Redis connections</title>
<updated>2016-06-14T15:41:17+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2016-06-14T14:49:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3582c6aedcee14162217cd103092e6340a1c4741'/>
<id>3582c6aedcee14162217cd103092e6340a1c4741</id>
<content type='text'>
Increment the counter `new_redis_connections` on each call to
`Redis::Client#connect`, if we're in a transaction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Increment the counter `new_redis_connections` on each call to
`Redis::Client#connect`, if we're in a transaction.
</pre>
</div>
</content>
</entry>
<entry>
<title>Instrument private/protected methods</title>
<updated>2016-06-14T13:17:51+00:00</updated>
<author>
<name>Paco Guzman</name>
<email>pacoguzmanp@gmail.com</email>
</author>
<published>2016-06-13T16:49:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dadc531353bdf0e384d05d173d19756b0d9fba13'/>
<id>dadc531353bdf0e384d05d173d19756b0d9fba13</id>
<content type='text'>
By default instrumentation will instrument public,
protected and private methods, because usually
heavy work is done on private method or at least
that’s what facts is showing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By default instrumentation will instrument public,
protected and private methods, because usually
heavy work is done on private method or at least
that’s what facts is showing
</pre>
</div>
</content>
</entry>
<entry>
<title>Instrument all Banzai::ReferenceParser classes</title>
<updated>2016-06-13T10:03:25+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-06-13T09:59:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ffd316483ce01591e84996dfaedd539480226e5a'/>
<id>ffd316483ce01591e84996dfaedd539480226e5a</id>
<content type='text'>
Now that this code is no longer part of Banzai::Filter it needs to be
instrumented explicitly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that this code is no longer part of Banzai::Filter it needs to be
instrumented explicitly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Instrument `RepositoryCheck::SingleRepositoryWorker` manually</title>
<updated>2016-06-07T16:10:55+00:00</updated>
<author>
<name>Alejandro Rodríguez</name>
<email>alejorro70@gmail.com</email>
</author>
<published>2016-06-02T20:47:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d485ec9f1c7bf00a3c87e3e91b6a306f234a5232'/>
<id>d485ec9f1c7bf00a3c87e3e91b6a306f234a5232</id>
<content type='text'>
This worker is called manually by `RepositoryCheck::BatchWorker` meaning it's not tracked automatically by the Sidekiq middleware.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This worker is called manually by `RepositoryCheck::BatchWorker` meaning it's not tracked automatically by the Sidekiq middleware.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename metric to 'rails queue duration'</title>
<updated>2016-05-26T15:53:21+00:00</updated>
<author>
<name>Jacob Vosmaer</name>
<email>jacob@gitlab.com</email>
</author>
<published>2016-05-26T15:53:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=5771114f9b5dba9c17b273a5dec0ef6900f6da9d'/>
<id>5771114f9b5dba9c17b273a5dec0ef6900f6da9d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Align class name with field name</title>
<updated>2016-05-25T12:55:23+00:00</updated>
<author>
<name>Jacob Vosmaer</name>
<email>jacob@gitlab.com</email>
</author>
<published>2016-05-25T12:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c049534da635b3252c564162150b041a2b823860'/>
<id>c049534da635b3252c564162150b041a2b823860</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
