Skip to content

Commit

Permalink
Update Metrics Exporter README
Browse files Browse the repository at this point in the history
The updated readme removes text indicating that the exporter is still in
alpha.
  • Loading branch information
psx95 committed Jun 11, 2024
1 parent 7a8dcf4 commit 3352476
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ See [Tracing Readme](exporters/trace/README.md) for installation and usage instr

## Google Cloud Monitoring Exporter

*Note: This is an alpha-release.*

See [Metrics Readme](exporters/metrics/README.md) for installation and usage instructions.

## Google Cloud Autoconfigure module
Expand Down
18 changes: 13 additions & 5 deletions exporters/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[![Maven Central][maven-image]][maven-url]

*NOTE: While Opentelemetry Metrics API is stable, the SDK is still Alpha in OpenTelemetry, and this exporter is not guaranteed to work across versions.*

Opentelemetry Google Monitoring Metrics Exporter allows users to send collected metrics
to Google Cloud.

Expand All @@ -15,13 +13,23 @@ Google Cloud Monitoring is a managed service provided by Google Cloud Platform.

## Usage

TODO(jsuereth): Write this.

See [the code example](../../examples/metrics) for details.

## Authentication

TODO(jsuereth): Write this section.
If you are running in a GCP environment, the exporter will automatically authenticate using the environment's service account. If not, you will need to follow the instructions in Authentication.

This exporter uses [google-cloud-java](https://github.com/googleapis/google-cloud-java), which uses the [google-auth-library-java](https://github.com/googleapis/google-auth-library-java) for authentication. For details about how to configure the authentication see [here](https://github.com/googleapis/google-cloud-java#authentication).
The credentials can be passed into the exporter via the `setCredentials` method in the [MetricConfiguration](https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/blob/7a8dcf420f5551bf0df969f83928b18c443da5aa/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricConfiguration.java).

If you prefer to manually set the credentials use:
```java
MetricConfiguration.builder()
.setCredentials(new GoogleCredentials(new AccessToken(accessToken, expirationTime)))
.setProjectId("MyProjectId")
.build();
```
before passing it into the MetricExporter constructor.

## Configuration

Expand Down

0 comments on commit 3352476

Please sign in to comment.