Skip to content

homestars/datadog-service_catalog

Repository files navigation

Datadog::ServiceCatalog

Maintainability Rating Security Rating Technical Debt

Use Markdown front matter to update DataDog's ServiceCatalog

Installation

Add this line to your application's Gemfile:

gem 'datadog-service_catalog'

Usage

Prerequisites

You need:

  1. Datadog API key
  2. and a Datadog Application Key

Add Rake Tasks

Add the following to your Rakefile:

require 'datadog/service_catalog/rake_tasks'

namespace :service_catalog do
  Datadog::ServiceCatalog.configure do |config|
    config.datadog_api_key = '..'
    config.datadog_application_key = '..'
    config.markdown_file = 'service_info.md'
  end
  
  Datadog::ServiceCatalog::RakeTasks::Validate.new
	Datadog::ServiceCatalog::RakeTasks::UploadAll.new(['service_catalog:validate'])
end

This provides two new rake tasks:

  1. service_catalog:validate - validate your service definition
  2. service_catalog:upload_all - upload service definitions for all datadog_service_identifiers

Front Matter Setup

Add YAML front matter to the configuration specified Markdown file that follows the Service Catalog Schema. The one exception is a mandatory key datadog_service_identifiers that is used by this gem to know what service(s) should get the specified service definition. You can review a full example in the sample_frontmatter.md file.

---
team: Homestars Enablement Team
datadog_service_identifiers:
  - accounts-contracts-api
  - accounts-contracts-api-postgres
  - accounts-contracts-api-que
tags:
  - accounts-contracts-api
# continue adding service catalog supported keys and values here ...
---

As you build your service definition, use rake service_catalog:validate to ensure it is valid. Once your definition is complete use rake service_catalog:upload_all to create or update your service catalog entries to DataDog.

References

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/homestars/datadog-service_catalog.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages