forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'opensearch-project:main' into main
- Loading branch information
Showing
191 changed files
with
6,086 additions
and
383 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
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 was deleted.
Oops, something went wrong.
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 @@ | ||
ad391210ffd806931334be9670a35af00c56f959 |
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,23 @@ | ||
/* | ||
* 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. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
dependencies { | ||
testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" | ||
testImplementation "junit:junit:${versions.junit}" | ||
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}" | ||
testImplementation(project(":test:framework")) { | ||
exclude group: 'org.opensearch', module: 'opensearch-telemetry' | ||
} | ||
} | ||
|
||
tasks.named('forbiddenApisMain').configure { | ||
replaceSignatureFiles 'jdk-signatures' | ||
} |
31 changes: 31 additions & 0 deletions
31
libs/telemetry/src/main/java/org/opensearch/telemetry/Telemetry.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,31 @@ | ||
/* | ||
* 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; | ||
|
||
import org.opensearch.telemetry.metrics.MetricsTelemetry; | ||
import org.opensearch.telemetry.tracing.TracingTelemetry; | ||
|
||
/** | ||
* Interface defining telemetry | ||
*/ | ||
public interface Telemetry { | ||
|
||
/** | ||
* Provides tracing telemetry | ||
* @return tracing telemetry instance | ||
*/ | ||
TracingTelemetry getTracingTelemetry(); | ||
|
||
/** | ||
* Provides metrics telemetry | ||
* @return metrics telemetry instance | ||
*/ | ||
MetricsTelemetry getMetricsTelemetry(); | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/MetricsTelemetry.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,16 @@ | ||
/* | ||
* 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; | ||
|
||
/** | ||
* Interface for metrics telemetry providers | ||
*/ | ||
public interface MetricsTelemetry { | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
libs/telemetry/src/main/java/org/opensearch/telemetry/metrics/package-info.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,12 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Contains metrics related classes | ||
*/ | ||
package org.opensearch.telemetry.metrics; |
12 changes: 12 additions & 0 deletions
12
libs/telemetry/src/main/java/org/opensearch/telemetry/package-info.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,12 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* Contains telemetry related classes | ||
*/ | ||
package org.opensearch.telemetry; |
45 changes: 45 additions & 0 deletions
45
libs/telemetry/src/main/java/org/opensearch/telemetry/tracing/AbstractSpan.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,45 @@ | ||
/* | ||
* 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.tracing; | ||
|
||
/** | ||
* Base span | ||
*/ | ||
public abstract class AbstractSpan implements Span { | ||
|
||
/** | ||
* name of the span | ||
*/ | ||
private final String spanName; | ||
/** | ||
* span's parent span | ||
*/ | ||
private final Span parentSpan; | ||
|
||
/** | ||
* Base constructor | ||
* @param spanName name of the span | ||
* @param parentSpan span's parent span | ||
*/ | ||
protected AbstractSpan(String spanName, Span parentSpan) { | ||
this.spanName = spanName; | ||
this.parentSpan = parentSpan; | ||
} | ||
|
||
@Override | ||
public Span getParentSpan() { | ||
return parentSpan; | ||
} | ||
|
||
@Override | ||
public String getSpanName() { | ||
return spanName; | ||
} | ||
|
||
} |
Oops, something went wrong.