forked from openzipkin/zipkin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds AutocompleteTags and corresponding REST api (openzipkin#2332)
* Adds AutocompleteTags and corresponding REST api This adds an optional storage interface `AutocompleteTags` to the `StorageComponent` and corresponding endpoints to support the UI. /api/v2/autocompleteKeys and /api/v2/autocompleteKeys?key=http.host The server accepts a parameter `zipkin.storage.autocompleteKeys` which acts as a whitelist as storing values for every tag would be expensive. * Info when not implemented and backfill tests
- Loading branch information
1 parent
faf2816
commit 7804665
Showing
11 changed files
with
308 additions
and
22 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
41 changes: 41 additions & 0 deletions
41
zipkin/src/main/java/zipkin2/storage/AutocompleteTags.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 @@ | ||
/* | ||
* Copyright 2015-2018 The OpenZipkin Authors | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
package zipkin2.storage; | ||
|
||
import java.util.List; | ||
import zipkin2.Call; | ||
|
||
/** | ||
* Provides autocomplete functionality by providing values for a given tag key, usually derived from | ||
* {@link SpanConsumer}. | ||
*/ | ||
public interface AutocompleteTags { | ||
|
||
/** | ||
* Retrieves the list of tag getKeys whose values may be returned by {@link #getValues(String)}. | ||
* | ||
* @see StorageComponent.Builder#autocompleteKeys(List) | ||
*/ | ||
Call<List<String>> getKeys(); | ||
|
||
/** | ||
* Retrieves the list of values, if the input is configured for autocompletion. If a key is not | ||
* configured, or there are no values available, an empty result will be returned. | ||
* | ||
* @throws IllegalArgumentException if the input is empty. | ||
* @see StorageComponent.Builder#autocompleteKeys(List) | ||
*/ | ||
Call<List<String>> getValues(String key); | ||
} |
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
Oops, something went wrong.