Meta tags:
description= This depends on adding a grpc service in agent-config that will be used for getting dynamic config. hypertrace/agent-config#61;
Headings (most frequently used words):
uh, oh, navigation, get, dynamic, config, 309, are, footer, you, diff, view, menu, repository, there, no, files, selected, for, viewing, sure, want, to, change, the, base, filter, by, extension,
Text of the page (most frequently used words):
#config (42), file (39), java (37), hypertrace (34), import (34), the (30), org (28), main (26), agent (25), grpc (21), this (20), service (20), public (20), core (20), agentconfig (19), and (18), protobuf (18), github (17), dynamicconfigfetcher (17), static (16), shashank11p (16), line (15), build (15), com (15), private (14), server (14), string (13), expand (13), google (13), 2021 (13), merge (12), from (12), all (12), for (12), show (12), hidden (12), characters (12), unicode (12), javaagent (12), load (12), you (11), that (11), applied (11), updateconfigurationresponse (11), void (11), initialconfigurationresponse (11), configbuilder (11), environmentconfig (11), request (10), loading (10), return (10), null (10), diff (10), hypertraceconfig (10), pull (9), reload (9), throws (9), may (9), open (9), change (8), dynamicconfigserver (8), new (8), thread (8), ioexception (8), final (8), license (8), number (8), bidirectional (8), src (8), response (8), configfile (8), branch (8), not (7), suggestion (7), cannot (7), suggestions (7), while (7), comments (7), code (7), changes (7), down (7), dynamic (7), api (7), apr (7), sign (7), responseobserver (6), util (6), review (6), learn (6), about (6), view (6), newbuilder (6), get (6), ht_prefix (6), into (6), commits (6), security (5), please (5), there (5), error (5), class (5), configurationservicegrpc (5), system (5), what (5), more (5), test (5), configupdatedtimestamp (5), dynamicconfigserviceurl (5), yaml (5), remote (5), tracking (5), upstream (5), feb (5), base (5), your (5), can (4), was (4), page (4), override (4), start (4), since (4), timeunit (4), 116 (4), original (4), contains (4), text (4), interpreted (4), compiled (4), differently (4), than (4), appears (4), below (4), editor (4), reveals (4), desktop (4), delete (4), edit (4), blockingstub (4), builder (4), channel (4), filename (4), gradle (4), kts (4), files (4), support (4), copilot (4), community (3), navigation (3), add (3), batch (3), commit (3), retry (3), stub (3), interruptedexception (3), shutdown (3), stop (3), requests (3), err (3), concurrent (3), under (3), see (3), with (3), version (3), additions (3), deletions (3), initializeconfig (3), tobuilder (3), int64value (3), runnable (3), applypropertiesandenvvars (3), applydefaults (3), visiblefortesting (3), jsonformat (3), javax (3), annotation (3), apply (3), plugins (3), artifact (3), hide (3), whitespace (3), filter (3), 309 (3), refname (3), account (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), contact (2), status (2), privacy (2), terms (2), footer (2), been (2), outdated (2), single (2), only (2), one (2), viewing (2), toggle (2), annotations (2), oncompleted (2), onnext (2), streamobserver (2), updateconfigurationrequest (2), updateconfiguration (2), initialconfigurationrequest (2), initialconfiguration (2), dynamicconfigservice (2), blockuntilshutdown (2), awaittermination (2), library (2), seconds (2), serving (2), resources (2), println (2), try (2), shutting (2), jvm (2), use (2), logger (2), have (2), reset (2), its (2), run (2), runtime (2), serverbuilder (2), port (2), without (2), distributed (2), apache (2), gettimestamp (2), managedchannelbuilder (2), jsonwriter (2), objectmapper (2), inputstream (2), log (2), getproperty (2), config_file_property (2), executors (2), dynamic_config_service_url (2), url (2), link (2), loads (2), slf4j (2), resource (2), enabled (2), jackson (2), dataformat (2), json (2), issues (2), plugin (2), spec (2), protoc (2), are (2), selected (2), hypertraceconfigtest (2), split (2), unified (2), failed (2), jump (2), nbsp (2), extension (2), select (2), tree (2), draft (2), old (2), default (2), could (2), tags (2), branches (2), issue (2), insights (2), projects (2), actions (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, 2026, inc, right, now, check, back, later, queued, multi, pending, reviews, has, marked, resolved, must, existing, order, create, valid, applying, deleted, lines, supported, per, subset, closed, invalid, because, were, made, notes, oops, something, went, wrong, extends, configurationserviceimplbase, 8980, args, exception, method, comment, makes, linter, happy, setupdateconfigurationresponse, getupdateconfigurationresponse, setinitialconfigurationresponse, getinitialconfigurationresponse, await, termination, uses, daemon, threads, shut, printstacktrace, catch, stderr, here, hook, addshutdownhook, getruntime, forport, addservice, int, package, limitations, specific, language, governing, permissions, warranties, conditions, any, kind, either, express, implied, basis, unless, required, applicable, law, agreed, writing, software, http, www, licenses, obtain, copy, except, compliance, licensed, copyright, authors, getagentconfig, setjavaagent, getjavaagent, setdatacapture, getdatacapture, setenabled, getenabled, settimestamp, setvalue, currenttimemillis, newblockingstub, fortarget, useplaintext, configurationserviceblockingstub, implements, writevalueasstring, obj, 236, 269, convertyamltojson, does, exist, exists, isdirectory, canread, 130, 155, printer, omittinginsignificantwhitespace, print, loaded, info, synchronized, scheduleatfixedrate, setcontextclassloader, setdaemon, true, dynamic_agent_config_fetcher, newscheduledthreadpool, set, env, vars, properties, gets, loggerfactory, reporting, propagationformat, opa, datacapture, reader, inputstreamreader, fileinputstream, parser, stringvalue, int32value, boolvalue, common, resource_attributes, attributes, service_name, name, addition, implementation, fasterxml, convert, impl, supports, https, 3633, workaround, generated, javaversion, current, isjava9compatible, netty, dependencies, whose, defined, above, options, ofsourceset, foreach, generateprototasks, gen, compiler, publish, maven, central, idea, deletion, conversations, clear, filters, viewed, types, updating, dependency, 1212cbf, adding, e886774, implementing, during, 6ccd439, 4a3cf6c, eabd4f9, 46025b4, d9766a3, mar, c60b348, bb29758, 5f5c930, 1a71a72, 06e14c8, 9aa407a, hold, shift, click, range, changed, checks, conversation, wants, implementgetdynamicconfig, some, removed, timeline, become, sure, want, nothing, found, choose, already, clicking, agree, our, occasionally, send, related, emails, statement, free, maintainers, question, project, items, discussions, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, connect, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
Text of the page (random words):
diation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message hypertrace javaagent repository navigation code issues 35 35 pull requests 4 4 discussions actions projects security and quality insights more items get dynamic config 309 new issue have a question about this project sign up for a free github account to open an issue and contact its maintainers and the community sign up for github by clicking sign up for github you agree to our terms of service and privacy statement we ll occasionally send you account related emails already on github sign in to your account draft shashank11p wants to merge 13 commits into hypertrace main base main choose a base branch branches tags could not load branches branch not found refname loading refname default could not load tags nothing to show refname default loading are you sure you want to change the base some commits from the old base branch may be removed from the timeline and old review comments may become outdated loading change base from shashank11p implementgetdynamicconfig conversation 0 commits 13 checks 0 files changed uh oh there was an error while loading please reload this page draft get dynamic config 309 show file tree hide file tree changes from all commits commits show all changes 13 commits select commit hold shift click to select a range 9aa407a merge pull request 2 from hypertrace main shashank11p feb 3 2021 06e14c8 merge pull request 3 from hypertrace main shashank11p feb 4 2021 1a71a72 merge pull request 4 from hypertrace main shashank11p feb 5 2021 5f5c930 merge pull request 5 from hypertrace main shashank11p feb 10 2021 bb29758 merge pull request 6 from hypertrace main shashank11p feb 16 2021 c60b348 merge remote tracking branch upstream main into main shashank11p mar 30 2021 d9766a3 merge remote tracking branch upstream main into main shashank11p apr 1 2021 46025b4 merge remote tracking branch upstream main into main shashank11p apr 9 2021 eabd4f9 merge remote tracking branch upstream main into main shashank11p apr 13 2021 4a3cf6c merge remote tracking branch upstream main into main shashank11p apr 14 2021 6ccd439 implementing to get dynamic config during runtime shashank11p apr 14 2021 e886774 adding test shashank11p apr 15 2021 1212cbf updating dependency shashank11p apr 15 2021 file filter filter by extension filter by extension java nbsp 4 kts nbsp 1 all 2 file types selected viewed files clear filters conversations failed to load comments retry loading uh oh there was an error while loading please reload this page jump to jump to file failed to load files retry loading uh oh there was an error while loading please reload this page diff view unified split hide whitespace apply and reload show whitespace diff view unified split hide whitespace apply and reload javaagent core javaagent core build gradle kts build gradle kts src main java org hypertrace agent core config javaagent core src main java org hypertrace agent core config environmentconfig java environmentconfig java javaagent core src main java org hypertrace agent core config hypertraceconfig java hypertraceconfig java test java org hypertrace agent core config javaagent core src test java org hypertrace agent core config dynamicconfigserver java dynamicconfigserver java javaagent core src test java org hypertrace agent core config hypertraceconfigtest java hypertraceconfigtest java there are no files selected for viewing 21 changes 20 additions 1 deletion 21 javaagent core build gradle kts show comments view file edit file delete file open in desktop this file contains hidden or 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 show hidden characters original file line number diff line number diff line change expand up 3 7 3 7 import com google protobuf gradle plugins java library idea id com google protobuf version 0 8 13 id com google protobuf version 0 8 15 id org hypertrace publish maven central plugin expand all 12 7 12 18 protobuf the artifact spec for the protobuf compiler artifact com google protobuf protoc 3 11 4 plugins id grpc artifact io grpc protoc gen grpc java 1 37 0 generateprototasks ofsourceset main foreach it plugins apply the grpc plugin whose spec is defined above without options id grpc expand all 31 6 42 14 dependencies api com google protobuf protobuf java 3 11 4 api com google protobuf protobuf java util 3 11 4 api io grpc grpc stub 1 37 0 api io grpc grpc protobuf 1 37 0 api io grpc grpc netty 1 37 0 if javaversion current isjava9compatible workaround for javax annotation generated see https github com grpc grpc java issues 3633 api javax annotation javax annotation api 1 3 1 convert yaml to json since java protobuf impl supports only json implementation com fasterxml jackson dataformat jackson dataformat yaml 2 11 3 expand down 1 change 1 addition 0 deletions 1 javaagent core src main java org hypertrace agent core config environmentconfig java show comments view file edit file delete file open in desktop this file contains hidden or 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 show hidden characters original file line number diff line number diff line change expand up 36 6 36 7 private environmentconfig private static final string ht_prefix ht public static final string config_file_property ht_prefix config file public static final string dynamic_config_service_url ht_prefix dynamic config service url static final string service_name ht_prefix service name static final string enabled ht_prefix enabled static final string resource_attributes ht_prefix resource attributes expand down 84 changes 77 additions 7 deletions 84 javaagent core src main java org hypertrace agent core config hypertraceconfig java show comments view file edit file delete file open in desktop this file contains hidden or 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 show hidden characters original file line number diff line number diff line change expand up 21 15 21 20 import com google common annotations visiblefortesting import com google protobuf boolvalue import com google protobuf int32value import com google protobuf int64value import com google protobuf stringvalue import com google protobuf util jsonformat import com google protobuf util jsonformat parser import io grpc channel import io grpc managedchannelbuilder import java io file import java io fileinputstream import java io ioexception import java io inputstream import java io inputstreamreader import java io reader import java util concurrent executors import java util concurrent timeunit import org hypertrace agent config config import org hypertrace agent config config agentconfig import org hypertrace agent config config datacapture expand all 38 10 43 15 import org hypertrace agent config config opa builder import org hypertrace agent config config propagationformat import org hypertrace agent config config reporting import org hypertrace agent config configurationservicegrpc import org hypertrace agent config service import org slf4j logger import org slf4j loggerfactory link hypertraceconfig loads a yaml config from file link hypertraceconfig loads a yaml config from file and gets dynamic config if dynamic config service url is set in env vars or system properties public class hypertraceconfig private hypertraceconfig expand all 64 10 74 25 private hypertraceconfig public static agentconfig get if agentconfig null string dynamicconfigserviceurl environmentconfig getproperty environmentconfig dynamic_config_service_url dynamicconfigfetcher dynamicconfigfetcher null if dynamicconfigserviceurl null dynamicconfigfetcher new dynamicconfigfetcher dynamicconfigserviceurl executors newscheduledthreadpool 1 runnable thread thread new thread runnable dynamic_agent_config_fetcher thread setdaemon true thread setcontextclassloader null return thread scheduleatfixedrate dynamicconfigfetcher 60 30 timeunit seconds synchronized hypertraceconfig class if agentconfig null try agentconfig load agentconfig load dynamicconfigfetcher log info config loaded jsonformat printer omittinginsignificantwhitespace print agentconfig expand down expand up 130 21 155 29 public static void reset private static agentconfig load throws ioexception visiblefortesting static agentconfig load dynamicconfigfetcher dynamicconfigfetcher throws ioexception string configfile environmentconfig getproperty environmentconfig config_file_property if configfile null return environmentconfig applypropertiesandenvvars applydefaults agentconfig newbuilder build agentconfig builder configbuilder agentconfig newbuilder if dynamicconfigfetcher null configbuilder dynamicconfigfetcher initializeconfig tobuilder return environmentconfig applypropertiesandenvvars applydefaults configbuilder build return load configfile return load configfile dynamicconfigfetcher visiblefortesting static agentconfig load string filename throws ioexception static agentconfig load string filename dynamicconfigfetcher dynamicconfigfetcher throws ioexception file configfile new file filename if configfile exists configfile isdirectory configfile canread log error config file does not exist filename agentconfig builder configbuilder agentconfig newbuilder if dynamicconfigfetcher null configbuilder dynamicconfigfetcher initializeconfig tobuilder return environmentconfig applypropertiesandenvvars applydefaults configbuilder build expand down expand up 236 4 269 41 private static string convertyamltojson inputstream yaml throws ioexception objectmapper jsonwriter new objectmapper return jsonwriter writevalueasstring obj public static class dynamicconfigfetcher implements runnable private final configurationservicegrpc configurationserviceblockingstub blockingstub private static int64value configupdatedtimestamp private dynamicconfigfetcher string dynamicconfigserviceurl channel channel managedchannelbuilder fortarget dynamicconfigserviceurl useplaintext build blockingstub configurationservicegrpc newblockingstub channel configupdatedtimestamp int64value newbuilder setvalue system currenttimemillis build override public void run service updateconfigurationresponse response blockingstub updateconfiguration service updateconfigurationrequest newbuilder settimestamp configupdatedtimestamp build configupdatedtimestamp response gettimestamp agentconfig builder configbuilder hypertraceconfig get tobuilder configbuilder setenabled response getenabled configbuilder setdatacapture response getdatacapture configbuilder setjavaagent response getjavaagent agentconfig configbuilder build private agentconfig initializeconfig service initialconfigurationresponse response blockingstub initialconfiguration service initialconfigurationrequest newbuilder build configupdatedtimestamp response gettimestamp return response getagentconfig 116 changes 116 additions 0 deletions 116 javaagent core src test java org hypertrace agent core config dynamicconfigserver java show comments view file edit file delete file open in desktop this file contains hidden or 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 show hidden characters original file line number diff line number diff line change 0 0 1 116 copyright the hypertrace authors licensed 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 hypertrace agent core config import io grpc server import io grpc serverbuilder import java io ioexception import java util concurrent timeunit import org hypertrace agent config configurationservicegrpc import org hypertrace agent config service public class dynamicconfigserver private final server server private service initialconfigurationresponse initialconfigurationresponse private service updateconfigurationresponse updateconfigurationresponse public dynamicconfigserver int port server serverbuilder forport port addservice new dynamicconfigservice build start serving requests public void start throws ioexception server start runtime getruntime addshutdownhook new thread override public void run use stderr here since the logger may have been reset by its jvm shutdown hook system err println shutting down grpc server since jvm is shutting down try dynamicconfigserver this stop catch interruptedexception e e printstacktrace system err system err println server shut down stop serving requests and shutdown resources public void stop throws interruptedexception if server null server shutdown awaittermination 30 timeunit seconds await termination on the main thread since the grpc library uses daemon threads public void blockuntilshutdown throws interruptedexception if server null server awaittermination public service initialconfiguratio...
|