-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tracing] Structured logging based on Span events (#8583)
* [tracing] Update tracing.txt for Opentelemetry 0.6.0 version bump * [tracing] Add array value to span event attribute. Add span event logging. * [tracing] Add events to SpanHTTPHandler. Add events to TracedHTTPClient. * [tracing] Add log events to HandleSession, ReverseProxyHandler, JDBCBackedSession map and RedisBackedSessionMap. Additional changes include: - Disabling pretty printng in LoggingOptions for event JSON. * [tracing] Instrument DriverServiceSessionFactory and DockerSessionFactory with event logs. - Alphabetize EventAttributeValue Type enum - Alphabetize switch case in openTelemetrySpan - Breakdown TracerTest into multiple test methods for Span event testing - Add vargs to EventAttributeValue for array value types * [tracing] Remove AttributeKey enum method toString(). Add AttributeKey enum method getKey() * [tracing] Instrument event logs for LocalDistributor, LocalNode, GridStatusHandler, LocalSessionMap and ProtocolConverter. * [tracing] Fix indentation and conflict in JdbcBackedSessionMap [skip ci] Co-authored-by: David Burns <david.burns@theautomatedtester.co.uk> Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
- Loading branch information
1 parent
49f2c2e
commit 738dd0e
Showing
22 changed files
with
1,154 additions
and
250 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
62 changes: 62 additions & 0 deletions
62
java/client/src/org/openqa/selenium/remote/tracing/AttributeKey.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,62 @@ | ||
// Licensed to the Software Freedom Conservancy (SFC) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The SFC 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. | ||
|
||
package org.openqa.selenium.remote.tracing; | ||
|
||
public enum AttributeKey { | ||
|
||
EXCEPTION_EVENT("exception"), | ||
EXCEPTION_TYPE("exception.type"), | ||
EXCEPTION_MESSAGE("exception.message"), | ||
EXCEPTION_STACKTRACE("exception.stacktrace"), | ||
|
||
SPAN_KIND("span.kind"), | ||
|
||
HTTP_METHOD("http.method"), | ||
HTTP_URL("http.url"), | ||
HTTP_STATUS_CODE("http.status_code"), | ||
HTTP_TARGET_HOST("http.target_host"), | ||
HTTP_CLIENT_CLASS("http.client_class"), | ||
HTTP_HANDLER_CLASS("http.handler_class"), | ||
|
||
LOGGER_CLASS("logger"), | ||
|
||
DRIVER_RESPONSE("driver.response"), | ||
DRIVER_URL("driver.url"), | ||
DOWNSTREAM_DIALECT("downstream.dialect"), | ||
UPSTREAM_DIALECT("upstream.dialect"), | ||
|
||
SESSION_ID("session.id"), | ||
SESSION_CAPABILITIES("session.capabilities"), | ||
SESSION_URI("session.uri"), | ||
|
||
DATABASE_STATEMENT ("db.statement"), | ||
DATABASE_OPERATION ("db.operation"), | ||
DATABASE_USER ("db.user"), | ||
DATABASE_CONNECTION_STRING ("db.connection_string"), | ||
DATABASE_SYSTEM("db.system"); | ||
|
||
private final String key; | ||
|
||
AttributeKey(String key) { | ||
this.key = key; | ||
} | ||
|
||
public String getKey() { | ||
return this.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
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
Oops, something went wrong.