Skip to content

Commit 325b321

Browse files
authored
Update project docs and layout (#92)
* Update README and add README for instrumentation Resolves #28 * Fix macaron instrumentation package name * Update instrumentation README Keep Go package docs in Go form. * Update README Add Contents of the repo section and link to CONTRIBUTING.md * Fix relative replace for macaron * Update README.md Fix gitter link.
1 parent 135745a commit 325b321

File tree

12 files changed

+53
-6
lines changed

12 files changed

+53
-6
lines changed

README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# opentelemetry-go-contrib
1+
# OpenTelemetry-Go Contrib
22

3-
This repo contains packages that facilitate instrumenting commonly
4-
used libraries with OpenTelemetry for distributed tracing and
5-
monitoring.
3+
[![Circle CI](https://circleci.com/gh/open-telemetry/opentelemetry-go-contrib.svg?style=svg)](https://circleci.com/gh/open-telemetry/opentelemetry-go-contrib)
4+
[![Docs](https://godoc.org/go.opentelemetry.io/contrib?status.svg)](https://pkg.go.dev/go.opentelemetry.io/contrib)
5+
[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/contrib)](https://goreportcard.com/report/go.opentelemetry.io/contrib)
6+
[![Gitter](https://badges.gitter.im/open-telemetry/opentelemetry-go.svg)](https://gitter.im/open-telemetry/opentelemetry-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
67

8+
Collection of 3rd-party instrumentation and exporters for [OpenTelemetry-Go](https://github.com/open-telemetry/opentelemetry-go).
79

10+
## Contents
11+
12+
- [Instrumentation](./instrumentation/): Packages providing OpenTelemetry instrumentation for 3rd-party libraries.
13+
- [Exporters](./exporters/): Packages providing OpenTelemetry exporters for 3rd-party telemetry systems.
14+
15+
## Contributing
16+
17+
For information on how to contribute, consult [the contributing guidelines](./CONTRIBUTING.md)

instrumentation/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Instrumentation
2+
3+
Code contained in this directory contains instrumentation for 3rd-party Go packages.
4+
5+
## Organization
6+
7+
In order to ensure the maintainability and discoverability of instrumentation packages, the following guidelines MUST be followed.
8+
9+
### Packaging
10+
11+
All instrumentation packages MUST be of the form:
12+
13+
```
14+
go.opentelemetry.io/contrib/instrumentation/{PACKAGE}
15+
```
16+
17+
Where `{PACKAGE}` is the name of the package being instrumented.
18+
19+
For example:
20+
21+
- `go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux`
22+
- `go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1`
23+
- `go.opentelemetry.io/contrib/instrumentation/database/sql`
24+
25+
Consequentially, this means that all instrumentation MUST be contained in a sub-directory structure matching the package name.
26+
27+
### Contents
28+
29+
All instrumentation packages MUST adhere to [the projects' contributing guidelines](../CONTRIBUTING.md).
30+
Additionally the following guidelines for package composition need to be followed.
31+
32+
- All instrumentation packages MUST be a Go package.
33+
Therefore, an appropriately configured `go.mod` and `go.sum` need to exist for each package.
34+
- To help understand the instrumentation a Go package documentation SHOULD be included.
35+
This documentation SHOULD be in a dedicated `doc.go` file if the package is more than one file.
36+
It SHOULD contain useful information like what the purpose of the instrumentation is, how to use it, and any compatibility restrictions that might exist.
37+
- Examples of how to actually use the instrumentation SHOULD be included.

instrumentation/macaron/go.mod renamed to instrumentation/gopkg.in/macaron.v1/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ module go.opentelemetry.io/contrib/instrumentation/macaron
22

33
go 1.14
44

5+
replace go.opentelemetry.io/contrib => ../../..
6+
57
require (
68
github.com/stretchr/testify v1.5.1
79
go.opentelemetry.io/contrib v0.6.1
810
go.opentelemetry.io/otel v0.6.0
911
gopkg.in/macaron.v1 v1.3.5
1012
)
11-
12-
replace go.opentelemetry.io/contrib => ../../

0 commit comments

Comments
 (0)