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

Update README to point to docs website for setup instructions #208

Merged
merged 2 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Building & Testing

### Using local packages with other projects

To share this project with another local project you will need to build and store the distributable nuget package in a local nuget source directory. The following makefile target creates a local nuget source, builds and publishes the packages.

`make publish_local`

After the command has run, you can add the package to another project using the normal add package command:

`dotnet add package Honeycomb.OpenTelemetry`
82 changes: 8 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
This is Honeycomb's distribution of OpenTelemetry for .NET.
It makes getting started with OpenTelemetry and Honeycomb easier!

**NOTE** This project took over a pre-existing Nuget package `Honeycomb.OpenTelemetry` after version `0.9.0-pre`.
Version `0.9.0-pre` is the only version that will contain the initial implementation [Honeycomb exporter](https://github.com/honeycombio/opentelemetry-dotnet).
## Getting Started

Honeycomb's OpenTelemetry .NET SDK gives you the ability to add manual instrumentation to your applications.

- [Documentation](https://docs.honeycomb.io/getting-data-in/dotnet/opentelemetry-distro/)
- [Examples](/examples/)

## Why would I want to use this?

Expand All @@ -16,76 +20,6 @@ Version `0.9.0-pre` is the only version that will contain the initial implementa
- Deterministic sampling!
- Multi-span attributes!

## Getting Started

### Installing the Honeycomb.OpenTelemetry package

You can add the package to your application by using the following command:

`dotnet add package Honeycomb.OpenTelemetry --prerelease`

### Configuration

The two ways to configure the Honeycomb OpenTelemetry SDK distro to send data to Honeycomb are via command line arguments and `IConfiguration` instances (eg via appsettings.json).

The available configuration options are:

|Command line argument|Appsetting key|Description|
|-|-|-|
|`--honeycomb-apikey`|Honeycomb.ApiKey|`required` The API key used to send data|
|`--honeycomb-dataset`|Honeycomb.Dataset|`required` The dataset to store telemetry data in|
|`--honeycomb-samplerate`|Honeycomb.SampleRate|`optional` Defaults to 1 (sample everything)|
|`--honeycomb-endpoint`|Honeycomb.Endpoint|`optional` Override the endpoint data is sent to|
|`--service-name`|Honeycomb.ServiceName|`optional` Defaults to project's assembly name|
|`--service-version`|Honeycomb.ServieVersion|`optional` Defaults to project's assembly version|

*NOTE* While ServiceName is optional, it can be useful to set it to something that best describes the process that is being traced. eg `auth-service`

Using command line arguments:
```bash
dotnet run --service-name=my-app --honeycomb-apikey={apikey} --honeycomb-dataset={dataset}
```

Using appsettings.json:
```json
{
"Honeycomb": {
"ServiceName": "my-app",
"ApiKey": "{apikey}",
"Dataset": "{dataset}"
}
}
```

### Examples

See the [examples](examples) directory for some sample applications showing how to configure the library.


## Building & Testing
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved

### Prerequisites to Build

You will need to download and install the latest .NET SDK:

- [.NET 5.0](https://dotnet.microsoft.com/download/dotnet/5.0)

The following makefile commands build the projects:

`make` or `make build`

The following makefile command executes tests:

`make test`

### Using local packages with other projects

To share this project with another local project you will need to build and store the distributable nuget package in a local nuget source directory. The following makefile target creates a local nuget source, builds and publishes the packages.

`make publish_local`

After the command has run, you can add the package to another project using the normal add package command:

`dotnet add package Honeycomb.OpenTelemetry`
## License

The default location is `${HOME}/.nuget/local` and can overridden to another location by setting the `NUGET_PACKAGES_LOCAL` environment variable.
[Apache 2.0 License](./LICENSE).