flyrain commented on code in PR #845:
URL: https://github.com/apache/polaris/pull/845#discussion_r1926228264


##########
site/content/in-dev/unreleased/telemetry.md:
##########
@@ -0,0 +1,149 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Telemetry
+linkTitle: Telemetry
+type: docs
+weight: 450
+---
+
+## Metrics
+
+Metrics are published using [Micrometer]; they are available from Polaris's 
management interface
+(port 8282 by default) under the path `/q/metrics`. For example, if the server 
is running on
+localhost, the metrics can be accessed via http://localhost:8282/q/metrics.
+
+[Micrometer]: https://quarkus.io/guides/telemetry-micrometer
+
+Metrics can be scraped by Prometheus or any compatible metrics scraping 
server. See:
+[Prometheus](https://prometheus.io) for more information.
+
+Additional tags can be added to the metrics by setting the 
`polaris.metrics.tags.*` property. Each
+tag is a key-value pair, where the key is the tag name and the value is the 
tag value. For example,
+to add a tag `environment=prod` to all metrics, set 
`polaris.metrics.tags.environment=prod`. Many
+tags can be added, such as below:
+
+```properties
+polaris.metrics.tags.service=polaris
+polaris.metrics.tags.environment=prod
+polaris.metrics.tags.region=us-west-2
+```
+
+Note that by default Polaris adds one tag: `application=Polaris`. You can 
override this tag by
+setting the `polaris.metrics.tags.application=<new-value>` property.
+
+## Traces
+
+Traces are published using [OpenTelemetry]. 
+
+[OpenTelemetry]: https://quarkus.io/guides/opentelemetry-tracing
+
+In order for the server to enable OpenTelemetry and publish its traces, the
+`quarkus.otel.exporter.otlp.traces.endpoint` property _must_ be defined. Its 
value must be a valid
+collector endpoint URL, with either `http://` or `https://` scheme. The 
collector must talk the

Review Comment:
   ```suggestion
   To enable OpenTelemetry and publish traces for Polaris, set a valid 
collector endpoint URL with `http://` or `https://` as the server property 
`quarkus.otel.exporter.otlp.traces.endpoint`. The collector must talk the
   ```



##########
site/content/in-dev/unreleased/telemetry.md:
##########
@@ -0,0 +1,149 @@
+---
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+title: Telemetry
+linkTitle: Telemetry
+type: docs
+weight: 450
+---
+
+## Metrics
+
+Metrics are published using [Micrometer]; they are available from Polaris's 
management interface
+(port 8282 by default) under the path `/q/metrics`. For example, if the server 
is running on
+localhost, the metrics can be accessed via http://localhost:8282/q/metrics.
+
+[Micrometer]: https://quarkus.io/guides/telemetry-micrometer
+
+Metrics can be scraped by Prometheus or any compatible metrics scraping 
server. See:
+[Prometheus](https://prometheus.io) for more information.
+
+Additional tags can be added to the metrics by setting the 
`polaris.metrics.tags.*` property. Each
+tag is a key-value pair, where the key is the tag name and the value is the 
tag value. For example,
+to add a tag `environment=prod` to all metrics, set 
`polaris.metrics.tags.environment=prod`. Many
+tags can be added, such as below:
+
+```properties
+polaris.metrics.tags.service=polaris
+polaris.metrics.tags.environment=prod
+polaris.metrics.tags.region=us-west-2
+```
+
+Note that by default Polaris adds one tag: `application=Polaris`. You can 
override this tag by
+setting the `polaris.metrics.tags.application=<new-value>` property.
+
+## Traces
+
+Traces are published using [OpenTelemetry]. 
+
+[OpenTelemetry]: https://quarkus.io/guides/opentelemetry-tracing
+
+In order for the server to enable OpenTelemetry and publish its traces, the
+`quarkus.otel.exporter.otlp.traces.endpoint` property _must_ be defined. Its 
value must be a valid
+collector endpoint URL, with either `http://` or `https://` scheme. The 
collector must talk the
+OpenTelemetry protocol (OTLP) and the port must be its gRPC port (by default 
4317), e.g.
+"http://otlp-collector:4317";. _If this property is not set, the server will 
not publish traces._
+
+Alternatively, it's possible to forcibly disable OpenTelemetry at runtime by 
setting the following
+property: `quarkus.otel.sdk.disabled=true`.

Review Comment:
   ```suggestion
   You can disable OpenTelemetry at runtime by setting 
`quarkus.otel.sdk.disabled=true`.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to