Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for custom check in dev env #4116

Merged
merged 3 commits into from
Sep 27, 2019

Conversation

ogaca-dd
Copy link
Contributor

@ogaca-dd ogaca-dd commented Sep 3, 2019

What does this PR do?

Explain how to use a custom check inside the development environment.

@ogaca-dd ogaca-dd requested review from a team as code owners September 3, 2019 16:22
@ogaca-dd ogaca-dd added changelog/no-changelog [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead.. labels Sep 3, 2019
@ogaca-dd ogaca-dd added this to the 6.15.0 milestone Sep 4, 2019
Copy link
Contributor

@remeh remeh left a comment

Choose a reason for hiding this comment

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

Nice addition because it's not quite automatic if you don't know it!
However, I think it'll be enabled only after an agent.build task run? If that's the case, we should probably mention it.

@@ -8,6 +8,10 @@ fit for your use case, please [refer to the official documentation][custom-check
Every check has its own YAML configuration file. The file has one mandatory key,
`instances` and one optional, `init_config`.

Note: If you want to run the custom check inside your development workspace
(github.com/DataDog/datadog-agent), you need to put `MyCheck.yaml` and
Copy link

Choose a reason for hiding this comment

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

Suggested change
(github.com/DataDog/datadog-agent), you need to put `MyCheck.yaml` and
(github.com/DataDog/datadog-agent), you must put `MyCheck.yaml` and

Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

I feel like it might be worth it to rephrase a little bit for clarity/accuracy?

@@ -8,6 +8,12 @@ fit for your use case, please [refer to the official documentation][custom-check
Every check has its own YAML configuration file. The file has one mandatory key,
`instances` and one optional, `init_config`.

Note: If you want to run the custom check inside your development workspace
Copy link
Member

@truthbk truthbk Sep 9, 2019

Choose a reason for hiding this comment

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

I feel like that the corollary to this is that the proper location is bin/agent/dist? Wondering if this might mislead people into thinking dropping the checks and config files in dev/dist is enough if they read this quickkly. I would maybe simplify/reorder this message to say:

Note:
If you want to run a custom check inside your development workspace 
(github.com/DataDog/datadog-agent), you must put `MyCheck.yaml` and
`MyCheck.py` in the `bin/agent/dist` folder located at the root of the 
datadog-agent repository. 
Please keep in mind that the `invoke agent.build` task will copy the
contents inside`dev/dist` to `bin/agent/dist` when ran, so you can use
that path if you need alonger-lived location for your custom checks. 

Or something along those lines?

@ogaca-dd ogaca-dd merged commit 1c8ffc6 into master Sep 27, 2019
@ogaca-dd ogaca-dd deleted the ogaca/ImproveCustomCheckDoc branch September 27, 2019 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog [deprecated] team/agent-core Deprecated. Use metrics-logs / shared-components labels instead..
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants