Skip to content

Merge remaining PRs from main to aad branch - #1749

Merged
Trask Stalnaker (trask) merged 21 commits into
aadfrom
trask/merge-remaining-to-aad-branch
Jun 22, 2021
Merged

Trask Stalnaker (trask) merged 21 commits into
aadfrom
trask/merge-remaining-to-aad-branch

Conversation

@trask

@trask Trask Stalnaker (trask) commented Jun 22, 2021 •

Copy link
Copy Markdown
Member

Merged

git cherry-pick 9931364a730ea373076b2dda065689ca2453a331 #Statsbeat + smoke test (#1660)

git cherry-pick ec078d50ec8157a6a33bd272a48020ffe3630048 #Fix attach statsbeat duplicates when computer resumes from sleep (#1696)
git cherry-pick ca7b5c30e35b24b2bc95a9c350a99aacabd0b1f9 #Use envelope name as the telemetry name and reduce payload (#1700)
git cherry-pick 503842086f4672e7f973958f8c30e37bb4b497bd #Send instrumentation and feature as UTF-8 strings for Statsbeat (#1707)

git cherry-pick 0b3f9ceea094e21f92d639228f9bc4887c035883 #Fix an NullPointerException in Linux Consumption Plan (#1732)
git cherry-pick cea5fd9c8cb2f43acc3429f519a146a25772cebb #Hotfixes for Linux Consumption Plan (#1737)
git cherry-pick d9e064e4dd0926385a92ef86003b3cf19abe2c15 #Statsbeat: rpId is not sent corectly for AppSvc Linux and Windows (#1739)
git cherry-pick 21dc76a496c09dbd48752b932e58acd3d7feed70 #Fix live metrics roles (#1747)
git cherry-pick 7a000d3767629a629ef140e4edeea01551330689 #Truncate exception telemetry's parsedStack when there is a deep stack trace exceeding 65536 bytes (#1702)

DID NOT MERGE #1702 yet it is merged too in this PR now

Helen (heyams) and others added 9 commits June 21, 2021 17:12
* Statsbeat

* Fix merge conflicts

* Add Statsbeat Helper

* Track instrumentation list and encode it as long

* Track instrumentation names

* Add java.vendor to the feature list

* Add Attach statsbeat

* Add azure metadata service api call

* Put common custom dimensions in the base statsbeat

* Test azure metadata sevice call on both linux and windows

* Add statbest metric names

* Add scheduler to send statsbeat

* Reset after each interval

* Refactor update frequency interval

* Remove unused imports

* Increment network statsbeat counters

* Add tests

* Add tests for encode/decode feature

* Add StatsbeatModule

* Use non-static methods

* Add unit tests for NetworkStatsbeat

* Add tests for AttachStatsbeat

* Add tests for FeatureStatsbeat

* Refactor tests

* Update instrumentations map

* Sort instrumentation list alphabetically

* Fix failed tests

* Send statsbeat to a testing ikey

* Refactor

* Refactor

* Fix nullpointerexception in instrumentation list

* Send network statsbeats when its count is not zero

* Refactor

* Move private instance variables to the top of the class

* Reinit resourceProviderId after reset

* Track request durations

* Remove unnecessary changes

* Fix merge conflicts

* Set feature statsbeat to have daily interval

* Clean up logs

* Reset after send is done

* Add smoke test

* Use the default ingestion endpoint if statsbeat's endpoint is unknown

* Get statsbeat ikey from the config

* Delete StatsbeatTelemetry

* Make smoke test work

* Make smoke test stable

* Revert a line

* Fix unit tests compilation errors

* Make feature interval configurable

* Fix not seeing network and attach statsbeat in smoketest

* Update smoke test config

* Validate more statsbeats in the smoke test

* Enable more smoke test app servers for Statsbeat

* Address comments

* Address comments

* Fix lgtm

* Make MetricTelemetry class final since there is no need for StatsbeatTelemetry

* Update statsbeat iKey to be a workspace based mode

* Fix spotbug, make constants package protected

* No need for lazy init

* User more efficient entrySet instead of keySet

* Fix spotbugs

* Init azure metadata service in AttachStatsbeat

* No need for lazy init

* Fix nullpointerexception in ErrorHandlerTest and ThrottlingHandlerTest

* Fix exception messages

* Fix a nullpointerexception

* Handle race condition between send and reset

* Add unit test for race condition

* Make sense to make metadata service have the same interval as AttachStatsbeat

* Decide precisely when to shutdown AzureMetadataService

* Clean up debug logs

* Avoid reading resources from signed jar - logging configuration

* Avoid reading resources from signed jar - sdk version

* Add ignore matcher for ai agent classes

* Add signed jar access debug option

* Convert appsvc logging configuration also

* CLEAN UP SHADOW JAR

* Update submodule

* Cleanup

* Igore a test for now

* Fix Illegal reflective access by org.junit.contrib.java.lang.system.EnvironmentVariables

* Fix unit tests

* Remove unused instance var

* Fix test failures

* Delete a console output log

* Fix spotbug DC_DOUBLECHECK

* Fix statsbeat smoke test not sending 'Request Duration'

* Fix a compiling error in unit test

* Address feedback

* Make statsbeat config internal and skip parsing the connection string

* Address feedback

* Track total and count for request durations

* Address more feedback

* Address feedback

* Use BitSet and move decode to a test utils class

* Remove transient properties since it's not using failOnUnknown on json adapter

* Refactor AttachStatsbeat

* Refactor AzureMetadataService

* Reduce visibility

* Refactor StatsbeatModule

* Introduce resetForTest

* Make a couple things volatile

* A bit more

* Simplify

* Update singleton naming a bit

* Reduce reliance on singletons for testing

* Reduce reliance on singletons for testing

* Synchronization

* Use long instead of double

* Fix a compiling error

* Remove unused methods

* Remove unused imports

* Fix statsbeat module is not properly initialized

* Use AtomicLong for consistency

* Fix array index out of bound

* Fix ThrottlingTest

* Fix ErrorHandlerTest

* Reuse requestSuccessCount for requestDurationCount

* Throw an exception when init gets called more than once

* Switch expected and actual parameters in tests

* Atomicity

* Can not be null

* Inline

* Warning message

* Remove null check

* Remove null check

* Add name to TODO

* Remove getInterval method

* Extract ResourceProvider into enum

* Extract OperatingSystem into enum

* Extract Feature enum

* Fix ErrorHandlerTest and ThrottleingHandlerTest

* Convert CustomDimensions to use explicit fields

* Move more constants out of Constants

* Move more constants out of Constants

* Move more constants out of Constants

* Move more constants out of Constants

* Remove unused field

* Add todo

* Small renaming

* Remove StatsbeatHelper

* Comments

* Send base 64 encoded string instead of utf-8 string for instrumentation and feature

* Add missing copyrights

* Add a comment

* Spotbugs

* Remove todos

* Fix instrumentation is empty in the payload

* WithoutPadding on Base64 encoder

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Use scheduleWithFixedDelay instead of scheduleAtFixedRate

* Fix a NullPointerException when the instrumentation name is not part of the instrumentation bit map
* Use envelope name as the telemetry name

* Fix tests
* Send long as a utf8 string instead of base64 string because kusto doesn't support this

* Refactor tests
* Don't send statsbeat when cikey is empty or null

* Use a diff Strings

* Remove negation!
* Fix verbose logging in Linux Consumption Plan when self diagnostic logging level is updated at runtime

* Update java doc

* Turn off Quick Pulse when the instrummentation key is null

* Update RoleName for Linux Consumption Plan

* Fix invalid instrumentation key

* Reword

* DefaultQuickPulsePingSender

* Fix statsbeat is not sent in Linux Consumption Plan

* RoleName is used in both header and payload

* Turn off azure metadata service on functions and appsvc and AKS

* Fix verbose logging

* Fix null resourceProviderId for Linux Consumption Plan

* Use scheduleWithFixedDelay

* Fix a compilation error

* Fix failing unit tests

* Unify logging configuration a little more

* Refactor

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Helen (heyams) and others added 12 commits June 21, 2021 19:13
… trace exceeding 65536 bytes (#1702)

* Repro deep stack trace

* Truncate parsedStack not to exceed 65536 bytes capacity

* Remove test code

* cleanup unused imports

* Fix javadoc

* add note

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
@trask
Trask Stalnaker (trask) deleted the trask/merge-remaining-to-aad-branch branch June 22, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants