Skip to content

Commit

Permalink
Merge branch 'main' into fix_otlp_grpc_ssl_default_2058
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored Mar 16, 2023
2 parents 91ea307 + e0a85f2 commit c242954
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You can link OpenTelemetry C++ SDK with libraries provided in

### Building as standalone CMake Project

1. Getting the opentelementry-cpp source with its submodules:
1. Getting the opentelemetry-cpp source with its submodules:

```console
# Change to the directory where you want to create the code repository
Expand Down Expand Up @@ -136,7 +136,7 @@ To use the library from a CMake project, you can locate it directly with
`find_package` and use the imported targets from generated package
configurations. As of now, this will import targets for both API and SDK. In
future, there may be separate packages for API and SDK which can be installed
and imported separtely according to need.
and imported separately according to need.

```cmake
# CMakeLists.txt
Expand Down Expand Up @@ -171,7 +171,7 @@ Bazel](https://docs.bazel.build/versions/3.7.0/install.html) guide.

### Building as standalone Bazel Project

1. Getting the opentelementry-cpp source:
1. Getting the opentelemetry-cpp source:

```console
# Change to the directory where you want to create the code repository
Expand All @@ -188,7 +188,7 @@ Bazel](https://docs.bazel.build/versions/3.7.0/install.html) guide.
the source code:

```console
$ cd opentelemtry-cpp
$ cd opentelemetry-cpp
$ bazel build //...
bazel build -- //... -//exporters/otlp/... -//exporters/prometheus/...
Extracting Bazel installation...
Expand Down Expand Up @@ -267,9 +267,9 @@ cc_library(
Windows DLL build is supported under **preview**. Please check the
[doc](./docs/build-as-dll.md) for more details.

## Generatring binary packages
## Generating binary packages

OpenTelemetry C++ supports generating plateform specific binary packages from CMake
OpenTelemetry C++ supports generating platform specific binary packages from CMake
configuration. The packages generated through this mayn't be production ready,
and user may have to customize it further before using it as distribution.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ of the current project.
| Windows Server 2022 (Visual Studio Enterprise 2022) | CMake |

[1]: Bazel build is disabled for GCC 4.8, as gRPC library 1.38 and above
(required by OTLP expoter) don't build with this compiler. See gRPC [official
(required by OTLP exporter) don't build with this compiler. See gRPC [official
support](https://grpc.io/docs/#official-support) document. CMake build doesn't
build OTLP exporter with GCC 4.8.

Expand Down
4 changes: 2 additions & 2 deletions docs/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Both these dependencies are listed here:
- OTLP messages are constructed as protobuf payloads.
- `protoc` compiler is used to generate C++ stubs for proto files provided
by `opentelemetry-proto`.
- `libprotobuf` library is used for generating serialised trace/metrics/log
- `libprotobuf` library is used for generating serialized trace/metrics/log
data to be sent to opentelemetry collector.
- License: The library is licensed
[here](https://github.com/protocolbuffers/protobuf/blob/master/LICENSE).
Expand Down Expand Up @@ -80,7 +80,7 @@ Both these dependencies are listed here:
- [Thrift](https://github.com/apache/thrift) - Serialization and RPC
framework.
- `thrift` compiler to generate C++ stubs for IDL data model for Jaeger.
- `libthrift` library to generate serialised trace/metrics/log data to be
- `libthrift` library to generate serialized trace/metrics/log data to be
sent to remote Jaeger service. Note: libthrift **0.12.0** doesn't work
with this Jaeger exporter. See
[#1680](https://github.com/open-telemetry/opentelemetry-cpp/issues/1680).
Expand Down
2 changes: 1 addition & 1 deletion docs/library-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Examples:
NGINX's dynamic module capability, tracing can be supported as a plugin. For
instance, the [nginx-opentracing
module](https://github.com/opentracing-contrib/nginx-opentracing) provides
this type of extension and is used by projects such as Kubernete's [ingress
this type of extension and is used by projects such as Kubernetes [ingress
controller](https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/opentracing/).
* The CPython binary also has no knowledge of OpenTelemetry, but C++ Python
extension modules can be instrumented for OpenTelemetry.
Expand Down
2 changes: 1 addition & 1 deletion docs/using-clang-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ For further guidance on editor integration, see these specific pages:

No. For the project as a whole, using clang-format is just one optional way to
format your code. While it will produce style-guide conformant code, other
formattings would also satisfy the style guide. For certain modules it may be
formats would also satisfy the style guide. For certain modules it may be
appropriate to use alternate coding style. In those scenarios a local directory
*.clang-format* settings file takes precedence over the one at top-level.
2 changes: 1 addition & 1 deletion examples/grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ of tracing such as:

``find_package(gRPC)``

2. Build and Deploy the opentelementry-cpp as described in
2. Build and Deploy the opentelemetry-cpp as described in
[INSTALL.md](../../INSTALL.md). Building the project will build all of the
examples and create new folders containing their executables within the
'build' directory NOT the 'examples' directory.
Expand Down
2 changes: 1 addition & 1 deletion examples/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ to server. The example shows several aspects of tracing such as:
* [HTTP
Server](https://github.com/open-telemetry/opentelemetry-cpp/tree/main/ext/include/opentelemetry/ext/http/server)

2. Build and Deploy the opentelementry-cpp as described in
2. Build and Deploy the opentelemetry-cpp as described in
[INSTALL.md](../../INSTALL.md)

3. Start the server from the `examples/http` directory
Expand Down
2 changes: 1 addition & 1 deletion examples/otlp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ API](https://github.com/open-telemetry/opentelemetry-cpp/tree/main/api).
To enable TLS authentication for OTLP grpc exporter, SslCredentials can be used
by specifying the path to client certificate pem file, or the string containing
this certificate via OtlpGrpcExporterOptions. The path to such a .pem file can be
provided as a command-line argument alongwith the collector endpoint to the main
provided as a command-line argument along with the collector endpoint to the main
binary invocation above.

### Running OpenTelemetry Collector as docker container
Expand Down
10 changes: 5 additions & 5 deletions examples/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Start the application and keep it running. Now we should be able to see the
metrics at [http://localhost:9464/metrics](http://localhost:9464/metrics) from a
web browser:

![Browser UI](https://user-images.githubusercontent.com/71217171/168492500-12bd1c99-33ab-4515-a294-17bc349b5d13.png)
![Browser UI](https://user-images.githubusercontent.com/9139451/224979531-beaa4d6e-98ec-4798-9934-ed25c6b196db.png)

Now, we understand how we can configure `PrometheusExporter` to export metrics.
Next, we are going to learn about how to use Prometheus to collect the metrics.
Expand Down Expand Up @@ -114,12 +114,12 @@ docker run -p 9090:9090 -v $(pwd):/etc/prometheus --network="host" prom/promethe

To use the graphical interface for viewing our metrics with Prometheus, navigate
to [http://localhost:9090/graph](http://localhost:9090/graph),
and type `prometheus_metric_example_bucket` in the expression bar of the UI;
finally, click the execute button.
and type `prometheus_metric_example_histogram_bucket` in the expression bar of
the UI; finally, click the execute button.

We should be able to see the following chart from the browser:

![Prometheus UI](https://user-images.githubusercontent.com/71217171/168492437-f9769db1-6f9e-49c6-8ef0-85f5e1188ba0.png)
![Prometheus UI](https://user-images.githubusercontent.com/9139451/224979224-e7d3865a-f56e-4bb9-8aab-e3f81de40d6e.png)

From the legend, we can see that the `instance` name and the `job` name are the
values we have set in `prometheus.yml`.
Expand Down Expand Up @@ -164,7 +164,7 @@ Feel free to find some handy PromQL
[here](https://promlabs.com/promql-cheat-sheet/).

![Grafana
UI](https://user-images.githubusercontent.com/71217171/168492482-047a4429-4854-4b3c-a2dd-4d75362090d5.png)
UI](https://user-images.githubusercontent.com/9139451/224983906-52e061b8-b561-4414-87e9-68823bbc3ad6.png)

```mermaid
graph TD
Expand Down
6 changes: 3 additions & 3 deletions examples/prometheus/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void InitMetrics(const std::string &name, const std::string &addr)
std::unique_ptr<metrics_sdk::MeterSelector> meter_selector{
new metrics_sdk::MeterSelector(name, version, schema)};
std::unique_ptr<metrics_sdk::View> sum_view{
new metrics_sdk::View{name, "description", metrics_sdk::AggregationType::kSum}};
new metrics_sdk::View{counter_name, "description", metrics_sdk::AggregationType::kSum}};
p->AddView(std::move(instrument_selector), std::move(meter_selector), std::move(sum_view));

// histogram view
Expand All @@ -61,8 +61,8 @@ void InitMetrics(const std::string &name, const std::string &addr)
new metrics_sdk::InstrumentSelector(metrics_sdk::InstrumentType::kHistogram, histogram_name)};
std::unique_ptr<metrics_sdk::MeterSelector> histogram_meter_selector{
new metrics_sdk::MeterSelector(name, version, schema)};
std::unique_ptr<metrics_sdk::View> histogram_view{
new metrics_sdk::View{name, "description", metrics_sdk::AggregationType::kHistogram}};
std::unique_ptr<metrics_sdk::View> histogram_view{new metrics_sdk::View{
histogram_name, "description", metrics_sdk::AggregationType::kHistogram}};
p->AddView(std::move(histogram_instrument_selector), std::move(histogram_meter_selector),
std::move(histogram_view));
metrics_api::Provider::SetMeterProvider(provider);
Expand Down

0 comments on commit c242954

Please sign in to comment.