Skip to content

Commit

Permalink
fix: Fix some typos (#1008)
Browse files Browse the repository at this point in the history
* fix: Fix some typos

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Ben Creech <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 18, 2022
1 parent cafafe4 commit 5666ee0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class Instrumentation {
* Populates entries with instrumentation info which is added in separate log entry
*
* @param logEntries {Iterable<LogEntry>} The list of entries to be populated
* @return {Tuple<Boolean, Iterable<LogEntry>>} containg a flag if instrumentation info was added
* or not and a modified list of log entries
* @return {Tuple<Boolean, Iterable<LogEntry>>} containing a flag if instrumentation info was
* added or not and a modified list of log entries
*/
public static Tuple<Boolean, Iterable<LogEntry>> populateInstrumentationInfo(
Iterable<LogEntry> logEntries) {
Expand Down Expand Up @@ -114,7 +114,7 @@ public static WriteOption[] addPartialSuccessOption(WriteOption[] options) {
* with 'java'. Will be truncated if longer than 14 characters.
* @param libraryVersion {string} The version of the logging library to be reported. Will be
* truncated if longer than 14 characters.
* @returns {LogEntry} The entry with diagnostic instrumentation data.
* @return {LogEntry} The entry with diagnostic instrumentation data.
*/
public static LogEntry createDiagnosticEntry(String libraryName, String libraryVersion) {
return createDiagnosticEntry(libraryName, libraryVersion, null);
Expand Down Expand Up @@ -193,7 +193,7 @@ private static Struct createInfoStruct(String libraryName, String libraryVersion
* The package-private helper method used to set the flag which indicates if instrumentation info
* already written or not.
*
* @returns The value of the flag before it was set.
* @return The value of the flag before it was set.
*/
static boolean setInstrumentationStatus(boolean value) {
if (instrumentationAdded == value) return instrumentationAdded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* <li>Protobuf's {@link Timestamp} and {@link java.time.Instant}
* </ul>
*
* The class complements convertion methods that are currently not supported in the published
* The class complements conversion methods that are currently not supported in the published
* protobuf-java-util. After migrating protobuf-java-util to Java 8 this class can be removed.
*
* @see <a href=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,15 +850,15 @@ public void write(Iterable<LogEntry> logEntries, WriteOption... options) {

try {
final Map<Option.OptionType, ?> writeOptions = optionMap(options);
final Boolean logingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata();
final Boolean loggingOptionsPopulateFlag = getOptions().getAutoPopulateMetadata();
final Boolean writeOptionPopulateFlga =
WriteOption.OptionType.AUTO_POPULATE_METADATA.get(writeOptions);
Tuple<Boolean, Iterable<LogEntry>> pair =
Instrumentation.populateInstrumentationInfo(logEntries);
logEntries = pair.y();

if (writeOptionPopulateFlga == Boolean.TRUE
|| (writeOptionPopulateFlga == null && logingOptionsPopulateFlag == Boolean.TRUE)) {
|| (writeOptionPopulateFlga == null && loggingOptionsPopulateFlag == Boolean.TRUE)) {
final MonitoredResource sharedResourceMetadata = RESOURCE.get(writeOptions);
logEntries =
populateMetadata(logEntries, sharedResourceMetadata, this.getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private String getFunctionName() {
String value = getter.getEnv("K_SERVICE");
if (value == null) {
// keep supporting custom function name if is not provided by default
// for backward compatability only; reconsider removing it after Gen2
// for backward compatibility only; reconsider removing it after Gen2
// environment is enrolled for Cloud Function
value = getter.getEnv("FUNCTION_NAME");
}
Expand All @@ -132,7 +132,7 @@ private String getModuleId() {
return getter.getEnv("GAE_SERVICE");
}
/**
* Heuristic to discover the namespace name of the current environment. There is no determenistic
* Heuristic to discover the namespace name of the current environment. There is no deterministic
* way to discover the namespace name of the process. The name is read from the {@link
* K8S_POD_NAMESPACE_PATH} when available or read from a user defined environment variable
* "NAMESPACE_NAME"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class HttpRequestTest {
private static final String REQUEST_URL = "http://www.example.com";
private static final Long REQUEST_SIZE = 1L;
private static final Integer STATUS = 200;
private static final Long REPONSE_SIZE = 2L;
private static final Long RESPONSE_SIZE = 2L;
private static final String USER_AGENT =
"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)";
private static final String REMOTE_IP = "192.168.1.1";
Expand All @@ -50,7 +50,7 @@ public class HttpRequestTest {
.setRequestUrl(REQUEST_URL)
.setRequestSize(REQUEST_SIZE)
.setStatus(STATUS)
.setResponseSize(REPONSE_SIZE)
.setResponseSize(RESPONSE_SIZE)
.setUserAgent(USER_AGENT)
.setRemoteIp(REMOTE_IP)
.setServerIp(SERVER_IP)
Expand All @@ -68,7 +68,7 @@ public void testBuilder() {
assertEquals(REQUEST_URL, HTTP_REQUEST.getRequestUrl());
assertEquals(REQUEST_SIZE, HTTP_REQUEST.getRequestSize());
assertEquals(STATUS, HTTP_REQUEST.getStatus());
assertEquals(REPONSE_SIZE, HTTP_REQUEST.getResponseSize());
assertEquals(RESPONSE_SIZE, HTTP_REQUEST.getResponseSize());
assertEquals(USER_AGENT, HTTP_REQUEST.getUserAgent());
assertEquals(REMOTE_IP, HTTP_REQUEST.getRemoteIp());
assertEquals(SERVER_IP, HTTP_REQUEST.getServerIp());
Expand Down Expand Up @@ -141,7 +141,7 @@ public void testToAndFromPb() {
assertEquals(REQUEST_URL, httpRequest.getRequestUrl());
assertEquals(REQUEST_SIZE, httpRequest.getRequestSize());
assertEquals(STATUS, httpRequest.getStatus());
assertEquals(REPONSE_SIZE, httpRequest.getResponseSize());
assertEquals(RESPONSE_SIZE, httpRequest.getResponseSize());
assertEquals(USER_AGENT, httpRequest.getUserAgent());
assertEquals(REMOTE_IP, httpRequest.getRemoteIp());
assertEquals(SERVER_IP, httpRequest.getServerIp());
Expand Down

0 comments on commit 5666ee0

Please sign in to comment.