Code Monkey home page Code Monkey logo

datadog-trace-paketo-buildpack's Introduction

Datadog Trace Agent Paketo Buildpack

The Paketo Datadog Trace Buildpack is a Cloud Native Buildpack that contributes the Datadog Trace Agent and configures it to connect to the service running on an OCI image. Currently, this buildpack only supports Java applications.

Behaviour

This buildpack will participate if all the following conditions are met:

  • A binding exists with type of DatadogTrace

The buildpack will do the following for Java applications:

  • Contributes the latest Datadog Java agent to a layer and configures JAVA_TOOL_OPTIONS to use it

Configuring the Agent

The agent can be configured by adding the following files in the binding's directory:

File Type Behaviour
.yaml Contributes the file into the image and assigns DD_JMXFETCH_CONFIG to the file's path in the image.
.properties Contributes the file into the image and assigns DD_TRACE_CONFIG to the file's path in the image.

Currently only one of each configuration file can be provided in the binding.

Contributing

To contribute or use the buildpack locally, see contributing

License

This buildpack is released under version 2.0 of the Apache License.

datadog-trace-paketo-buildpack's People

Contributors

kevinfwl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datadog-trace-paketo-buildpack's Issues

is this project still active?

It is using an old version of the API and would be better to use the stack as * instead of explicitly naming stacks.

Add Spring Boot Example

Thought it would be nice to share this since it took some figuring and it's super useful. Spring boot has a spring-boot:build-image command that can be modified to have this buildpack participate. This is a request to add an example of this usage to the repo's readme. I've documented what I know here:

Multiple buildpack support was added in Spring Boot 2.5.0 (this SB version also requires you update your spring cloud if using that too). By doing the following in pom.xml, you can get this working with maven and SB.

<build>
	<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<configuration>
				<image>
					<name>yourrepo.com/${artifactId}:${version}</name>
					<buildpacks>
						<buildpack>urn:cnb:builder:paketo-buildpacks/java</buildpack>
						<buildpack>docker://ghcr.io/datadog/datadog-trace-paketo-buildpack/datadog-trace-paketo-buildpack:1.0.0</buildpack>
					</buildpacks>
					<bindings>
						<binding>${project.basedir}/binding:/platform/bindings/DatadogTrace</binding>
					</bindings>
				</image>
			</configuration>
		</plugin>
	</plugins>
</build>

You also need to create a binding directory with the file type (no filename extension) and the contents DatadogTrace. You can optionally create properties or YAML file to list out options like dd.service, or (IIUC) you can use env variables at runtime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.