Skip to content

Conversation

Sinjo
Copy link
Member

@Sinjo Sinjo commented Mar 20, 2021

No description provided.

@Sinjo Sinjo requested a review from dmagliola March 20, 2021 20:15
@Sinjo Sinjo force-pushed the sinjo-wordsmithing branch from f8894c4 to d1d9a61 Compare March 20, 2021 20:15
@coveralls
Copy link

coveralls commented Mar 20, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling db75ed0 on sinjo-wordsmithing into 7635b8f on master.

README.md Outdated
**Declare metrics before fork**: As well as deleting files before your process forks, you
should make sure to declare your metrics then too. Because the metric registry is held in
memory, any metrics declared after forking will only be present in child processes where
the code declaring them ran, and as a result won't be consistently exported when scraped
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd say "may not be" rather than "won't".
The reason is that if your code consistently declares metrics (and i'm not sure how this doesn't happen), you can totally declare them after fork and it's fine. For example, if your metrics get declared when Ruby executes the class definitions.

README.md Outdated
Indeed, even if the content of the metric is stored in a file, the list of all metrics is
stored in memory. Creating metrics after fork would lead to unexported files metrics.
**Declare metrics before fork**: As well as deleting files before your process forks, you
should make sure to declare your metrics then too. Because the metric registry is held in
Copy link
Collaborator

Choose a reason for hiding this comment

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

declare your metrics then too
I find that "then too" a bit unclear as to when it is.

Can we make it more redundant but clear, something like you should also make sure to declare your metrics before the fork

Copy link
Collaborator

@dmagliola dmagliola left a comment

Choose a reason for hiding this comment

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

2 nitpicky, optional comments. feel free to ignore if you disagree.

@Sinjo Sinjo force-pushed the sinjo-wordsmithing branch from d1d9a61 to d3ca0ab Compare March 24, 2021 12:16
Copy link
Collaborator

@dmagliola dmagliola left a comment

Choose a reason for hiding this comment

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

Love it, thank you

Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
@Sinjo Sinjo force-pushed the sinjo-wordsmithing branch from d3ca0ab to db75ed0 Compare March 24, 2021 12:17
@Sinjo Sinjo merged commit 165b4c6 into master Mar 24, 2021
@Sinjo Sinjo deleted the sinjo-wordsmithing branch March 24, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants