/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */!function(e){function t(t){for(var n,a,i=t[0],o=t[1],s=0,u=[];s=.1||0===r?a()(r).format("0%"):a()(r).format("0.0%")}function p(e,t=10){return 0===e||e>=t?u(e):s(e)}function d(e){return e<1e3?u(e):e<1e6?`${u(e/1e3)}k`:e<1e9?`${u(e/1e6)}m`:e<1e12?`${u(e/1e9)}b`:`${u(e/1e12)}t`}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"e",(function(){return a})),n.d(t,"i",(function(){return i})),n.d(t,"h",(function(){return o})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"w",(function(){return u})),n.d(t,"u",(function(){return l})),n.d(t,"v",(function(){return p})),n.d(t,"y",(function(){return d})),n.d(t,"z",(function(){return f})),n.d(t,"x",(function(){return m})),n.d(t,"A",(function(){return b})),n.d(t,"t",(function(){return g})),n.d(t,"I",(function(){return v})),n.d(t,"L",(function(){return _})),n.d(t,"K",(function(){return h})),n.d(t,"J",(function(){return y})),n.d(t,"n",(function(){return x})),n.d(t,"H",(function(){return O})),n.d(t,"G",(function(){return k})),n.d(t,"F",(function(){return S})),n.d(t,"E",(function(){return A})),n.d(t,"D",(function(){return j})),n.d(t,"C",(function(){return P})),n.d(t,"l",(function(){return w})),n.d(t,"m",(function(){return M})),n.d(t,"o",(function(){return T})),n.d(t,"p",(function(){return D})),n.d(t,"j",(function(){return $})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return C})),n.d(t,"s",(function(){return R})),n.d(t,"k",(function(){return I})),n.d(t,"B",(function(){return L})),n.d(t,"b",(function(){return N})),n.d(t,"d",(function(){return U})),n.d(t,"c",(function(){return B}));const r="agent.name",a="cloud.availability_zone",i="cloud.provider",o="cloud.machine.type",s="cloud.instance.id",c="cloud.instance.name",u="service.name",l="service.environment",p="service.language.name",d="service.runtime.name",f="service.runtime.version",m="service.node.name",b="service.version",g="processor.event",v="transaction.duration.us",_="transaction.type",h="transaction.name",y="transaction.id",x="event.outcome",O="trace.id",k="span.type",S="span.subtype",A="span.name",j="span.id",P="span.destination.service.resource",w="error.grouping_key",M="error.grouping_name",T="host.name",D="host.os.version",$="container.id",E="kubernetes.pod.name",C="kubernetes.pod.uid",R="network.connection.type",I="device.model.identifier",L="session.id",N="client.geo.country_iso_code",U="client.geo.region_iso_code",B="client.geo.country_name"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9);function a(e){return Object(r.isFinite)(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=n(0).i18n.translate("xpack.apm.notAvailableLabel",{defaultMessage:"N/A"})},function(e,t,n){n.r(t);var r=__kbnBundles__.get("entry/core/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observability/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return f}));var r=n(0),a=n(23),i=n(3);const o="ENVIRONMENT_ALL",s="ENVIRONMENT_NOT_DEFINED",c=r.i18n.translate("xpack.apm.filter.environment.allLabel",{defaultMessage:"All"});function u(e){return e&&e!==s?e===o?c:e:r.i18n.translate("xpack.apm.filter.environment.notDefinedLabel",{defaultMessage:"Not defined"})}const l={value:o,label:u(o)},p={value:s,label:u(s)};function d(e){return function(e){return e&&e!==s&&e!==o}(e)?`${[i.u]}: ${Object(a.escapeKuery)(e)} `:null}function f({requestedEnvironment:e,currentEnvironmentUrlParam:t}){return(e||p.value)===(t||l.value)&&t||l.value}},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t){e.exports=__kbnSharedDeps__.Moment},function(e,t){e.exports=__kbnSharedDeps__.ElasticNumeral},function(e,t,n){"use strict";n.d(t,"c",(function(){return r.b})),n.d(t,"j",(function(){return r.f})),n.d(t,"g",(function(){return r.d})),n.d(t,"i",(function(){return r.e})),n.d(t,"b",(function(){return r.a})),n.d(t,"a",(function(){return o})),n.d(t,"n",(function(){return b})),n.d(t,"k",(function(){return g})),n.d(t,"f",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"h",(function(){return h})),n.d(t,"o",(function(){return j})),n.d(t,"e",(function(){return P})),n.d(t,"l",(function(){return $})),n.d(t,"m",(function(){return E}));var r=n(2),a=n(18),i=n.n(a);function o(e,t="milliseconds"){const n=i()(e),r=function(e){const t=e.utcOffset()/60,n=t>0?`+${t}`:t,r=Number.isInteger(t)?n:"Z";return e.format(`(UTC${r})`)}(n);return n.format(`${function(e){switch(e){case"years":return"YYYY";case"months":return"MMM YYYY";case"days":return"MMM D, YYYY";default:return""}}("days")}, ${function(e){switch(e){case"hours":return"HH";case"minutes":return"HH:mm";case"seconds":return"HH:mm:ss";case"milliseconds":return"HH:mm:ss.SSS";default:return""}}(t)} ${r}`)}var s=n(0),c=n(10),u=n.n(c),l=n(9),p=n(5),d=n(4);function f({unit:e,microseconds:t,defaultValue:n=p.a,threshold:a=10}){if(!Object(d.a)(t))return{value:n,formatted:n};const{convertedValue:i,unitLabel:o}=function(e,t,n=10){const a=t/1e3;switch(e){case"hours":return{unitLabel:s.i18n.translate("xpack.apm.formatters.hoursTimeUnitLabel",{defaultMessage:"h"}),convertedValue:Object(r.c)(u.a.duration(a).asHours(),n)};case"minutes":return{unitLabel:s.i18n.translate("xpack.apm.formatters.minutesTimeUnitLabel",{defaultMessage:"min"}),convertedValue:Object(r.c)(u.a.duration(a).asMinutes(),n)};case"seconds":return{unitLabel:s.i18n.translate("xpack.apm.formatters.secondsTimeUnitLabel",{defaultMessage:"s"}),convertedValue:Object(r.c)(u.a.duration(a).asSeconds(),n)};case"milliseconds":return{unitLabel:s.i18n.translate("xpack.apm.formatters.millisTimeUnitLabel",{defaultMessage:"ms"}),convertedValue:Object(r.c)(u.a.duration(a).asMilliseconds(),n)};case"microseconds":return{unitLabel:s.i18n.translate("xpack.apm.formatters.microsTimeUnitLabel",{defaultMessage:"μs"}),convertedValue:Object(r.d)(t)}}}(e,t,a);return{value:i,unit:o,formatted:`${i} ${o}`}}const m=(e,t)=>1e3*u.a.duration(e,t).asMilliseconds(),b=Object(l.memoize)(((e,t=10,n=1)=>{const r=function(e,t=10){return e>m(t,"hours")?"hours":e>m(t,"minutes")?"minutes":e>m(t,"seconds")?"seconds":e>m(1,"milliseconds")?"milliseconds":"microseconds"}(e,t);return(e,{defaultValue:a}={})=>f({unit:r,microseconds:Object(d.a)(e)?e*n:e,defaultValue:a,threshold:t})}),((e,t)=>`${e}_${t}`));function g(e){if(!Object(d.a)(e))return p.a;let t;return t=0===e?"0":e<=.1?"< 0.1":Object(r.b)(e),s.i18n.translate("xpack.apm.transactionRateLabel",{defaultMessage:"{displayedValue} tpm",values:{displayedValue:t}})}function v(e){return s.i18n.translate("xpack.apm.exactTransactionRateLabel",{defaultMessage:"{value} tpm",values:{value:Object(r.c)(e)}})}function _(e,{defaultValue:t=p.a}={}){return Object(d.a)(e)?b(e)(e,{defaultValue:t}).formatted:t}function h(e){return f({unit:"milliseconds",microseconds:e}).formatted}function y(e){return`${Object(r.b)(e/1e3)} KB`}function x(e){return`${Object(r.b)(e/1e6)} MB`}function O(e){return`${Object(r.b)(e/1e9)} GB`}function k(e){return`${Object(r.b)(e/1e12)} TB`}function S(e){return`${Object(r.b)(e)} B`}const A=e=>t=>null==t||isNaN(t)?"":e(t),j=Object(l.memoize)((e=>{const t=w(e);return A(t)})),P=A((e=>w(e)(e))),w=e=>e>1e12?k:e>1e9?O:e>1e6?x:e>1e3?y:S;var M=n(26),T=n(8);const D=({pathname:e,query:t})=>`${e}?${Object(M.stringify)(t)}`,$=(e,t)=>D({pathname:`/app/apm/services/${e}/errors`,query:{environment:null!=t?t:T.a.value}}),E=(e,t,n)=>D({pathname:`/app/apm/services/${e}`,query:{transactionType:n,environment:null!=t?t:T.a.value}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return m})),n.d(t,"m",(function(){return b})),n.d(t,"k",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"n",(function(){return _})),n.d(t,"q",(function(){return A})),n.d(t,"r",(function(){return j})),n.d(t,"w",(function(){return P})),n.d(t,"A",(function(){return w})),n.d(t,"C",(function(){return M})),n.d(t,"D",(function(){return T})),n.d(t,"F",(function(){return D})),n.d(t,"I",(function(){return $})),n.d(t,"L",(function(){return E})),n.d(t,"O",(function(){return R})),n.d(t,"R",(function(){return h})),n.d(t,"S",(function(){return y})),n.d(t,"bb",(function(){return x})),n.d(t,"cb",(function(){return C})),n.d(t,"db",(function(){return O})),n.d(t,"fb",(function(){return k})),n.d(t,"gb",(function(){return S})),n.d(t,"mb",(function(){return s})),n.d(t,"ob",(function(){return r})),n.d(t,"pb",(function(){return c})),n.d(t,"o",(function(){return B})),n.d(t,"p",(function(){return V})),n.d(t,"s",(function(){return F})),n.d(t,"t",(function(){return G})),n.d(t,"u",(function(){return z})),n.d(t,"v",(function(){return K})),n.d(t,"x",(function(){return H})),n.d(t,"y",(function(){return q})),n.d(t,"z",(function(){return Y})),n.d(t,"B",(function(){return W})),n.d(t,"E",(function(){return J})),n.d(t,"G",(function(){return Q})),n.d(t,"H",(function(){return Z})),n.d(t,"J",(function(){return X})),n.d(t,"K",(function(){return ee})),n.d(t,"M",(function(){return te})),n.d(t,"N",(function(){return ne})),n.d(t,"P",(function(){return re})),n.d(t,"Q",(function(){return ae})),n.d(t,"V",(function(){return pe})),n.d(t,"W",(function(){return le})),n.d(t,"X",(function(){return se})),n.d(t,"Y",(function(){return ue})),n.d(t,"Z",(function(){return ce})),n.d(t,"ab",(function(){return de})),n.d(t,"eb",(function(){return fe})),n.d(t,"hb",(function(){return me})),n.d(t,"jb",(function(){return I})),n.d(t,"kb",(function(){return L})),n.d(t,"lb",(function(){return N})),n.d(t,"nb",(function(){return U})),n.d(t,"f",(function(){return be})),n.d(t,"g",(function(){return ge})),n.d(t,"c",(function(){return ve})),n.d(t,"h",(function(){return _e})),n.d(t,"ib",(function(){return he})),n.d(t,"T",(function(){return ye})),n.d(t,"U",(function(){return xe}));const r="@timestamp",a="kibana",i=`${a}.alert`,o=`${i}.rule`,s=`${a}.space_ids`,c=`${a}.version`,u=`${i}.action_group`,l=`${i}.case_ids`,p=`${i}.duration.us`,d=`${i}.end`,f=`${i}.flapping`,m=`${i}.flapping_history`,b=`${i}.maintenance_window_ids`,g=`${i}.instance.id`,v=`${i}.last_detected`,_=`${i}.reason`,h=`${i}.start`,y=`${i}.status`,x=`${i}.time_range`,O=`${i}.uuid`,k=`${i}.workflow_status`,S=`${i}.workflow_tags`,A=`${o}.category`,j=`${o}.consumer`,P=`${o}.execution.uuid`,w=`${o}.name`,M=`${o}.parameters`,T=`${o}.producer`,D=`${o}.revision`,$=`${o}.tags`,E=`${o}.rule_type_id`,C=`${i}.url`,R=`${o}.uuid`,I="ecs.version",L="event.action",N="event.kind",U="tags",B=`${i}.risk_score`,V=`${o}.author`,F=`${o}.created_at`,G=`${o}.created_by`,z=`${o}.description`,K=`${o}.enabled`,H=`${o}.from`,q=`${o}.interval`,Y=`${o}.license`,W=`${o}.note`,J=`${o}.references`,Q=`${o}.rule_id`,Z=`${o}.rule_name_override`,X=`${o}.to`,ee=`${o}.type`,te=`${o}.updated_at`,ne=`${o}.updated_by`,re=`${o}.version`,ae=`${i}.severity`,ie=`${i}.suppression`,oe=`${ie}.terms`,se=`${oe}.field`,ce=`${oe}.value`,ue=`${ie}.start`,le=`${ie}.end`,pe=`${ie}.docs_count`,de=`${i}.system_status`,fe=`${i}.workflow_reason`,me=`${i}.workflow_user`,be=`${i}.evaluation.threshold`,ge=`${i}.evaluation.value`,ve=`${i}.context`,_e=`${i}.evaluation.values`,he={APM:"apm",LOGS:"logs",INFRASTRUCTURE:"infrastructure",OBSERVABILITY:"observability",SLO:"slo",SIEM:"siem",UPTIME:"uptime"},ye=(Object.values(he).map((e=>e)),"active"),xe="recovered"},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.CRITICAL="critical",e.MAJOR="major",e.MINOR="minor",e.WARNING="warning",e.LOW="low",e.UNKNOWN="unknown"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return p})),n.d(t,"a",(function(){return d}));var r=n(0),a=(n(7),n(14)),i=n(16);n(3),n(8);const o="apm";let s,c;!function(e){e.ErrorCount="apm.error_rate",e.TransactionErrorRate="apm.transaction_error_rate",e.TransactionDuration="apm.transaction_duration",e.Anomaly="apm.anomaly"}(s||(s={})),function(e){e.Avg="avg",e.P95="95th",e.P99="99th"}(c||(c={}));const u="threshold_met",l={id:u,name:r.i18n.translate("xpack.apm.a.thresholdMet",{defaultMessage:"Threshold met"})},p={[s.ErrorCount]:{name:r.i18n.translate("xpack.apm.errorCountAlert.name",{defaultMessage:"Error count threshold"}),actionGroups:[l],defaultActionGroupId:u,minimumLicenseRequired:"basic",producer:o,isExportable:!0},[s.TransactionDuration]:{name:r.i18n.translate("xpack.apm.transactionDurationAlert.name",{defaultMessage:"Latency threshold"}),actionGroups:[l],defaultActionGroupId:u,minimumLicenseRequired:"basic",producer:o,isExportable:!0},[s.Anomaly]:{name:r.i18n.translate("xpack.apm.anomalyAlert.name",{defaultMessage:"Anomaly"}),actionGroups:[l],defaultActionGroupId:u,minimumLicenseRequired:"basic",producer:o,isExportable:!0},[s.TransactionErrorRate]:{name:r.i18n.translate("xpack.apm.transactionErrorRateAlert.name",{defaultMessage:"Failed transaction rate threshold"}),actionGroups:[l],defaultActionGroupId:u,minimumLicenseRequired:"basic",producer:o,isExportable:!0}},d=[{type:a.a.CRITICAL,label:r.i18n.translate("xpack.apm.alerts.anomalySeverity.criticalLabel",{defaultMessage:"critical"}),threshold:i.a.CRITICAL},{type:a.a.MAJOR,label:r.i18n.translate("xpack.apm.alerts.anomalySeverity.majorLabel",{defaultMessage:"major"}),threshold:i.a.MAJOR},{type:a.a.MINOR,label:r.i18n.translate("xpack.apm.alerts.anomalySeverity.minor",{defaultMessage:"minor"}),threshold:i.a.MINOR},{type:a.a.WARNING,label:r.i18n.translate("xpack.apm.alerts.anomalySeverity.warningLabel",{defaultMessage:"warning"}),threshold:i.a.WARNING}]},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e[e.CRITICAL=75]="CRITICAL",e[e.MAJOR=50]="MAJOR",e[e.MINOR=25]="MINOR",e[e.WARNING=3]="WARNING",e[e.LOW=0]="LOW"}(r||(r={}))},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.MomentTimezone},function(e,t,n){e.exports=n(28)(1465)},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityShared/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnEsQuery},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/data/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.Rxjs},function(e,t,n){"use strict";t.decode=t.parse=n(31),t.encode=t.stringify=n(32)},function(e,t){e.exports=__kbnSharedDeps__.RxjsOperators},function(e,t){e.exports=__kbnSharedDeps_npm__},function(e,t,n){n(30),__kbnBundles__.define("plugin/apm/public",n,33)},function(e,t,n){n.p=window.__kbnPublicPath__.apm},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l=0?(p=b.substr(0,g),d=b.substr(g+1)):(p=b,d=""),f=decodeURIComponent(p),m=decodeURIComponent(d),r(o,f)?a(o[f])?o[f].push(m):o[f]=[o[f],m]:o[f]=m}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(o(e),(function(o){var s=encodeURIComponent(r(o))+n;return a(e[o])?i(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r{const{ApmCustomAssetsExtension:e}=await n.e(24).then(n.bind(null,1039));return{default:e}})),A={id:"apm",title:"APM",description:a.i18n.translate("xpack.apm.apmDescription",{defaultMessage:"Automatically collect in-depth performance metrics and errors from inside your applications."}),icon:"apmApp",path:"/app/apm",showOnHomePage:!1,category:"data"};var j=n(19),P=n.n(j),w=n(24),M=n(7),T=n(8);const D=Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(4),n.e(5),n.e(27)]).then(n.bind(null,1042));class service_detail_locator_APMServiceDetailLocator{constructor(e){P()(this,"id","APM_LOCATOR"),P()(this,"uiSettings",void 0),this.uiSettings=e}async getLocation(e){const{getPathForServiceDetail:t}=await D;return{app:"apm",path:t(e,{...this.uiSettings.get(w.UI_SETTINGS.TIMEPICKER_TIME_DEFAULTS),isComparisonEnabledByDefault:this.uiSettings.get(M.enableComparisonByDefault),defaultEnvironment:this.uiSettings.get(M.defaultApmServiceEnvironment,T.a.value)}),state:{}}}}const $=a.i18n.translate("xpack.apm.navigation.servicesTitle",{defaultMessage:"Services"}),E=a.i18n.translate("xpack.apm.navigation.serviceGroupsTitle",{defaultMessage:"Service groups"}),C=a.i18n.translate("xpack.apm.navigation.tracesTitle",{defaultMessage:"Traces"}),R=a.i18n.translate("xpack.apm.navigation.serviceMapTitle",{defaultMessage:"Service Map"}),I=a.i18n.translate("xpack.apm.navigation.dependenciesTitle",{defaultMessage:"Dependencies"}),L=a.i18n.translate("xpack.apm.navigation.apmSettingsTitle",{defaultMessage:"Settings"}),N=a.i18n.translate("xpack.apm.navigation.apmStorageExplorerTitle",{defaultMessage:"Storage Explorer"}),U=a.i18n.translate("xpack.apm.navigation.apmTutorialTitle",{defaultMessage:"Tutorial"});class plugin_ApmPlugin{constructor(e){this.initializerContext=e,this.initializerContext=e}setup(e,t){var l,x,O,k;const S=this.initializerContext.config.get(),j=t,{featureFlags:P}=S;j.home&&(j.home.environment.update({apmUi:!0}),j.home.featureCatalogue.register(A)),t.observabilityShared.navigation.registerSections(Object(s.from)(e.getStartServices()).pipe(Object(c.map)((([e,t])=>e.application.capabilities.apm.show?[{label:"APM",sortKey:400,entries:[{label:$,app:"apm",path:"/services",matchPath:e=>["/service-groups","/mobile-services","/services","/service-map"].some((t=>e.startsWith(t)))},{label:C,app:"apm",path:"/traces"},{label:I,app:"apm",path:"/dependencies/inventory",onClick:()=>{const{usageCollection:e}=t;e&&e.reportUiCounter("apm",o.METRIC_TYPE.CLICK,"side_nav_dependency")}}]}]:[]))));const w=async()=>{const{fetchObservabilityOverviewPageData:t,getHasData:r}=await Promise.all([n.e(0),n.e(28)]).then(n.bind(null,1032)),{hasFleetApmIntegrations:a}=await Promise.all([n.e(0),n.e(30)]).then(n.bind(null,1033)),{createCallApmApi:i}=await n.e(0).then(n.bind(null,82));return i(e),{fetchObservabilityOverviewPageData:t,getHasData:r,hasFleetApmIntegrations:a}};null===(l=j.home)||void 0===l||l.tutorials.registerCustomStatusCheck("apm_fleet_server_status_check",(async()=>{const{hasFleetApmIntegrations:e}=await w();return e()})),null===(x=j.home)||void 0===x||x.tutorials.registerCustomComponent("TutorialFleetInstructions",(()=>n.e(31).then(n.bind(null,1034)))),null===(O=j.home)||void 0===O||O.tutorials.registerCustomComponent("TutorialConfigAgent",(()=>n.e(7).then(n.bind(null,1026)))),null===(k=j.home)||void 0===k||k.tutorials.registerCustomComponent("TutorialConfigAgentRumScript",(()=>Promise.all([n.e(7),n.e(29)]).then(n.bind(null,1035)))),j.uiActions.registerTrigger({id:i.ObservabilityTriggerId.ApmTransactionContextMenu}),j.uiActions.registerTrigger({id:i.ObservabilityTriggerId.ApmErrorContextMenu}),t.observability.dashboard.register({appName:"apm",hasData:async()=>{const e=await w();return await e.getHasData()},fetchData:async e=>{const t=await w();return await t.fetchObservabilityOverviewPageData(e)}}),t.exploratoryView.register({appName:"apm",hasData:async()=>{const e=await w();return await e.getHasData()},fetchData:async e=>{const t=await w();return await t.fetchObservabilityOverviewPageData(e)}});const{observabilityRuleTypeRegistry:M}=t.observability;return e.application.register({id:"apm",title:"APM",order:8300,euiIconType:"logoObservability",appRoute:"/app/apm",icon:"plugins/apm/public/icon.svg",category:r.DEFAULT_APP_CATEGORIES.observability,navLinkStatus:r.AppNavLinkStatus.visible,deepLinks:[{id:"service-groups-list",title:E,path:"/service-groups"},{id:"services",title:$,path:"/services",navLinkStatus:S.serverless.enabled?r.AppNavLinkStatus.visible:r.AppNavLinkStatus.default},{id:"traces",title:C,path:"/traces",navLinkStatus:S.serverless.enabled?r.AppNavLinkStatus.visible:r.AppNavLinkStatus.default},{id:"service-map",title:R,path:"/service-map"},{id:"dependencies",title:I,path:"/dependencies/inventory",navLinkStatus:S.serverless.enabled?r.AppNavLinkStatus.visible:r.AppNavLinkStatus.default},{id:"settings",title:L,path:"/settings"},{id:"storage-explorer",title:N,path:"/storage-explorer",searchable:P.storageExplorerAvailable},{id:"tutorial",title:U,path:"/tutorial"}],async mount(t){const[{renderApp:r},[a,i]]=await Promise.all([Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(4),n.e(5),n.e(8),n.e(22)]).then(n.bind(null,1053)),e.getStartServices()]);return r({coreStart:a,pluginsSetup:j,appMountParameters:t,config:S,pluginsStart:i,observabilityRuleTypeRegistry:M})}}),function(e){e.register({id:f.d.ErrorCount,description:a.i18n.translate("xpack.apm.alertTypes.errorCount.description",{defaultMessage:"Alert when the number of errors in a service exceeds a defined threshold."}),format:({fields:e})=>({reason:e[p.n],link:Object(d.l)(String(e[h][0]),e[_]&&String(e[_][0]))}),iconClass:"bell",documentationUrl:e=>`${e.links.alerting.apmRules}`,ruleParamsExpression:Object(u.lazy)((()=>Promise.all([n.e(0),n.e(1),n.e(14)]).then(n.bind(null,1036)))),validate:()=>({errors:[]}),requiresAppContext:!1,defaultActionMessage:m}),e.register({id:f.d.TransactionDuration,description:a.i18n.translate("xpack.apm.alertTypes.transactionDuration.description",{defaultMessage:"Alert when the latency of a specific transaction type in a service exceeds a defined threshold."}),format:({fields:e})=>({reason:e[p.n],link:Object(d.m)(String(e[h][0]),e[_]&&String(e[_][0]),String(e[y][0]))}),iconClass:"bell",documentationUrl:e=>`${e.links.alerting.apmRules}`,ruleParamsExpression:Object(u.lazy)((()=>Promise.all([n.e(0),n.e(1),n.e(13)]).then(n.bind(null,1037)))),validate:()=>({errors:[]}),alertDetailsAppSection:Object(u.lazy)((()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(17)]).then(n.bind(null,1048)))),requiresAppContext:!1,defaultActionMessage:b}),e.register({id:f.d.TransactionErrorRate,description:a.i18n.translate("xpack.apm.alertTypes.transactionErrorRate.description",{defaultMessage:"Alert when the rate of transaction errors in a service exceeds a defined threshold."}),format:({fields:e})=>({reason:e[p.n],link:Object(d.m)(String(e[h][0]),e[_]&&String(e[_][0]),String(e[y][0]))}),iconClass:"bell",documentationUrl:e=>`${e.links.alerting.apmRules}`,ruleParamsExpression:Object(u.lazy)((()=>Promise.all([n.e(0),n.e(1),n.e(15)]).then(n.bind(null,1038)))),validate:()=>({errors:[]}),requiresAppContext:!1,defaultActionMessage:g}),e.register({id:f.d.Anomaly,description:a.i18n.translate("xpack.apm.alertTypes.anomaly.description",{defaultMessage:"Alert when either the latency, throughput, or failed transaction rate of a service is anomalous."}),format:({fields:e})=>({reason:e[p.n],link:Object(d.m)(String(e[h][0]),e[_]&&String(e[_][0]),String(e[y][0]))}),iconClass:"bell",documentationUrl:e=>`${e.links.alerting.apmRules}`,ruleParamsExpression:Object(u.lazy)((()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,1054)))),validate:()=>({errors:[]}),requiresAppContext:!1,defaultActionMessage:v})}(M),{locator:t.share.url.locators.create(new service_detail_locator_APMServiceDetailLocator(e.uiSettings))}}start(e,t){const{fleet:r}=t;if(t.observabilityAIAssistant.register((async({signal:r,registerContext:a,registerFunction:i})=>{(await Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(4),n.e(5),n.e(8),n.e(23)]).then(n.bind(null,1051))).registerAssistantFunctions({coreStart:e,pluginsStart:t,registerContext:a,registerFunction:i,signal:r})})),r){const e={title:a.i18n.translate("xpack.apm.fleetIntegration.enrollmentFlyout.installApmAgentTitle",{defaultMessage:"Install APM Agent"}),Component:k};r.registerExtension({package:"apm",view:"agent-enrollment-flyout",title:e.title,Component:e.Component}),r.registerExtension({package:"apm",view:"package-detail-assets",Component:S}),r.registerExtension({package:"apm",view:"package-policy-create",Component:Object(u.lazy)((async()=>{const{CreateAPMPolicyForm:e}=await Promise.all([n.e(2),n.e(6),n.e(25)]).then(n.bind(null,1040));return{default:e}}))}),r.registerExtension({package:"apm",view:"package-policy-edit",useLatestPackageVersion:!0,Component:Object(u.lazy)((async()=>{const{EditAPMPolicyForm:e}=await Promise.all([n.e(2),n.e(6),n.e(26)]).then(n.bind(null,1041));return{default:e}}))}),r.registerExtension({package:"apm",view:"package-policy-edit-tabs",tabs:[{title:"APM Agents",Component:Object(u.lazy)((async()=>{const{ApmAgents:e}=await Promise.all([n.e(0),n.e(4),n.e(12)]).then(n.bind(null,1050));return{default:e}}))}]})}}}const B=e=>new plugin_ApmPlugin(e)},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDom},function(e,t){e.exports=__kbnSharedDeps__.IoTs},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t){e.exports=__kbnSharedDeps__.ElasticCharts},function(e,t){e.exports=__kbnSharedDeps__.StyledComponents},function(e,t){e.exports=__kbnSharedDeps__.Uuid},function(e,t){e.exports=__kbnSharedDeps__.TsLib},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/triggersActionsUi/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observability/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnUiTheme},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/data/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnDatemath},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/ml/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnAnalytics},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/maps/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityAIAssistant/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/advancedSettings/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnRison},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaUtils/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/logsShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.EmotionCache},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/embeddable/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/exploratoryView/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t){e.exports=__kbnSharedDeps__.ReactRouter},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/unifiedSearch/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.ElasticEuiChartsTheme},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/dashboard/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/controls/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/controls/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/ml/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.SaferLodashSet},function(e,t){e.exports=__kbnSharedDeps__.LodashFp},function(e,t){e.exports=__kbnSharedDeps__.ReactQuery},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/fleet/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/esUiShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))}]);