Skip to content

Conversation

@korniltsev
Copy link
Contributor

No description provided.

Copy link
Collaborator

@eh-am eh-am left a comment

Choose a reason for hiding this comment

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

Looks good, couple thoughts:

  1. Let's document that parameter in the README.md.
  2. I think would be better to make it clearer in the env var name WHEN it flushes: something like PYROSCOPE_FLUSH_ON_INVOKE. Not too sold on this if we document it on the readme tbh.

main.go Outdated
// profile the extension?
selfProfiling = getEnvBool("PYROSCOPE_SELF_PROFILING")

flushRelayQueue = getEnvBool("PYROSCOPE_FLUSH_RELAY_QUEUE")
Copy link
Collaborator

@eh-am eh-am Oct 5, 2022

Choose a reason for hiding this comment

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

This is false by default, my understanding is that this functionality has no clear downsides right? Shouldn't we make it true by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The downside is that it can increase lambda invocation time and as a result billing. I'd keep it disabled by default. But it is not super strong opinion, we can change to enabled by default.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh I see now, since flush is sync, it makes the time before waiting for new events longer, therefore making it more expensive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe good idea to rename Flush to FlushSync so it is more obvious

Co-authored-by: eduardo aleixo <eh-am@users.noreply.github.com>
@korniltsev korniltsev merged commit e5b06d2 into main Oct 12, 2022
@korniltsev korniltsev deleted the feat/queue_flush branch October 12, 2022 15:13
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.

2 participants