-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into remote_global_state
Signed-off-by: Dhwanil Patel <[email protected]>
- Loading branch information
Showing
254 changed files
with
5,271 additions
and
1,209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Gradle Assemble | ||
on: [pull_request] | ||
|
||
jobs: | ||
assemble: | ||
if: github.repository == 'opensearch-project/OpenSearch' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: temurin | ||
- name: Setup docker (missing on MacOS) | ||
if: runner.os == 'macos' | ||
run: | | ||
brew install docker | ||
colima start | ||
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock | ||
- name: Run Gradle (assemble) | ||
run: | | ||
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
distribution/tools/plugin-cli/licenses/bc-fips-1.0.2.3.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
distribution/tools/plugin-cli/licenses/bc-fips-1.0.2.4.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9008d04fc13da6455e6a792935b93b629757335d |
35 changes: 35 additions & 0 deletions
35
libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/Counter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.telemetry.metrics; | ||
|
||
import org.opensearch.common.annotation.ExperimentalApi; | ||
import org.opensearch.telemetry.metrics.tags.Tags; | ||
|
||
/** | ||
* Counter adds the value to the existing metric. | ||
* {@opensearch.experimental} | ||
*/ | ||
@ExperimentalApi | ||
public interface Counter { | ||
|
||
/** | ||
* add value. | ||
* @param value value to be added. | ||
*/ | ||
void add(double value); | ||
|
||
/** | ||
* add value along with the attributes. | ||
* | ||
* @param value value to be added. | ||
* @param tags attributes/dimensions of the metric. | ||
*/ | ||
void add(double value, Tags tags); | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.telemetry.metrics; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Default implementation for {@link MetricsRegistry} | ||
*/ | ||
class DefaultMetricsRegistry implements MetricsRegistry { | ||
private final MetricsTelemetry metricsTelemetry; | ||
|
||
/** | ||
* Constructor | ||
* @param metricsTelemetry metrics telemetry. | ||
*/ | ||
public DefaultMetricsRegistry(MetricsTelemetry metricsTelemetry) { | ||
this.metricsTelemetry = metricsTelemetry; | ||
} | ||
|
||
@Override | ||
public Counter createCounter(String name, String description, String unit) { | ||
return metricsTelemetry.createCounter(name, description, unit); | ||
} | ||
|
||
@Override | ||
public Counter createUpDownCounter(String name, String description, String unit) { | ||
return metricsTelemetry.createUpDownCounter(name, description, unit); | ||
} | ||
|
||
@Override | ||
public void close() throws IOException { | ||
metricsTelemetry.close(); | ||
} | ||
} |
Oops, something went wrong.