Commit graph

14 commits

Author SHA1 Message Date
jianglai
c702b4486c Use standard java thread factory instead of the AppEngine flavor
With Java 8 in GAE standard environment, we can now use standard java thread factory to run the metric reporter in the background in daemon mode, which would not interfere with basic scaling idle timeout as App Engine thread would.

Because the thread is not created by ThreadManager, no App Engine APIs can be called from it. We therefore use GoogleCredential instead of AppIdentityCredential as HttpRequestInitializer, and NetHttpTransport instead of UlrFetchTransport as HttpTransport.

MetricReporter is lazy injected because it depends on jsonCredential retrieved from CloudKms, which is not available in a test environment, causing FrontendServletTest and BackendServletTest to fail.

Some minor re-formatting with google-java-format on edited files.

Lastly removed moe comments in import statement, which makes the linter unhappy.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172896227
2017-10-24 16:53:47 -04:00
jianglai
dc41d7923e Remove injectable constructors in metrics library
Users of the client library should be responsible for providing the bindings required. By removing the injectable constructors and named bindings in their parameters, the client library is no longer forcing its users to provide bindings with specific named annotations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170490834
2017-10-04 16:16:45 -04:00
shikhman
413a634533 Automated g4 rollback of changelist 156106183.
*** Reason for rollback ***

This change is crashing alpha

*** Original change description ***

Change metrics ThreadFactory to produce daemon threads

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156336467
2017-05-17 15:19:10 -04:00
shikhman
e1f4df86bd Change metrics ThreadFactory to produce daemon threads
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156106183
2017-05-17 12:21:12 -04:00
mmuller
b70f57b7c7 Update copyright year on all license headers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146111211
2017-02-02 16:27:22 -05:00
shikhman
3f9c53b850 Refactor Stackdriver-over-REST specific code to a different package
Downstream users who use gRPC rather than REST don't want to pull down
rest-related dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145834701
2017-01-30 15:03:53 -05:00
mcilwain
eaec03e670 Move ConfigModule and LocalTestConfig into RegistryConfig
This is the final preparatory step necessary in order to load and load
configuration from YAML in a static context and then provide it either via
Dagger (using ConfigModule) or through RegistryConfig's existing static
functions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143819983
2017-01-09 12:01:09 -05:00
shikhman
f76bc70f91 Preserve test logs and test summary output for Kokoro CI runs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135494972
2016-10-14 16:57:43 -04:00
shikhman
1a60073b24 Small fixes in StackdriverModule
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131955504
2016-09-02 13:48:47 -04:00
shikhman
e6beba2d39 Change resource type for Stackdriver to fix metrics push
Currently, it's forbidden for custom metrics to write to the gae_app resource
type.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131076789
2016-08-23 15:48:49 -04:00
shikhman
b45c2ca2ee Wire in MetricReporter into the backend servlet to publish metrics
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130468842
2016-08-22 14:07:45 -04:00
Justine Tunney
37d30591ed Narrowly scope privileges for API service objects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129099520
2016-08-02 19:18:09 -04:00
mcilwain
aa2f283f7c Convert entire project to strict lexicographical import sort ordering
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127234970
2016-07-13 15:59:53 -04:00
shikhman
aa1b5229a0 Create Stackdriver module and inject it into backend module
This adds Stackdriver as a DI module into the registry codebase. This is a
necessary prerequisite for using Stackdriver based monitoring. For now, I'm
only adding it to the backend module as it will be more work to add it to the
frontend module.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126730925
2016-07-13 15:22:19 -04:00