Fix some bugs with browser (#5683)

* fix query browser error log  bug
This commit is contained in:
zhang-wei 2020-10-18 17:58:29 +08:00 committed by GitHub
parent 7b2a0b4dac
commit 7e6b19dfc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 7 deletions

View File

@ -39,7 +39,7 @@ public class IDManager {
* @return encoded service id
*/
public static String buildId(String name, NodeType type) {
return buildId(name, type.equals(NodeType.Normal));
return buildId(name, type.equals(NodeType.Normal) || type.equals(NodeType.Browser));
}
public static String buildId(String name, boolean isNormal) {

View File

@ -20,7 +20,6 @@ package org.apache.skywalking.oap.server.core.browser.source;
import lombok.Getter;
import lombok.Setter;
import org.apache.skywalking.oap.server.core.analysis.NodeType;
import org.apache.skywalking.oap.server.core.source.ScopeDefaultColumn;
import org.apache.skywalking.oap.server.core.source.Source;
/**
@ -29,9 +28,7 @@ import org.apache.skywalking.oap.server.core.source.Source;
@Setter
@Getter
public abstract class BrowserAppTrafficSource extends Source {
@ScopeDefaultColumn.DefinedByField(columnName = "name", requireDynamicActive = true)
protected String name;
protected final NodeType nodeType = NodeType.Browser;
private final int count = 1;

View File

@ -53,6 +53,7 @@ public class BrowserLogQueryService implements Service {
final Pagination paging) throws IOException {
PaginationUtils.Page page = PaginationUtils.INSTANCE.exchange(paging);
BrowserErrorCategory errorCategory = Optional.ofNullable(category)
.filter(c -> !c.equals(ErrorCategory.ALL)) // ErrorCategory.All stands for query all.
.map(c -> BrowserErrorCategory.valueOf(c.name()))
.orElse(null);

View File

@ -14,5 +14,5 @@
# limitations under the License.
endpoints:
- key: ZTJl.0_L2UyZS1icm93c2Vy
- key: ZTJl.1_L2UyZS1icm93c2Vy
label: /e2e-browser

View File

@ -14,5 +14,5 @@
# limitations under the License.
services:
- key: ZTJl.0
- key: ZTJl.1
label: "e2e"

View File

@ -14,5 +14,5 @@
# limitations under the License.
instances:
- key: ZTJl.0_djEuMC4w
- key: ZTJl.1_djEuMC4w
label: not null