attribute_group.go 359 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. // Code generated from semantic convention specification. DO NOT EDIT.
  4. package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0"
  5. import "go.opentelemetry.io/otel/attribute"
  6. // The Android platform on which the Android application is running.
  7. const (
  8. // AndroidOSAPILevelKey is the attribute Key conforming to the
  9. // "android.os.api_level" semantic conventions. It represents the uniquely
  10. // identifies the framework API revision offered by a version
  11. // (`os.version`) of the android operating system. More information can be
  12. // found
  13. // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
  14. //
  15. // Type: string
  16. // RequirementLevel: Optional
  17. // Stability: experimental
  18. // Examples: '33', '32'
  19. AndroidOSAPILevelKey = attribute.Key("android.os.api_level")
  20. )
  21. // AndroidOSAPILevel returns an attribute KeyValue conforming to the
  22. // "android.os.api_level" semantic conventions. It represents the uniquely
  23. // identifies the framework API revision offered by a version (`os.version`) of
  24. // the android operating system. More information can be found
  25. // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels).
  26. func AndroidOSAPILevel(val string) attribute.KeyValue {
  27. return AndroidOSAPILevelKey.String(val)
  28. }
  29. // ASP.NET Core attributes
  30. const (
  31. // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the
  32. // "aspnetcore.rate_limiting.result" semantic conventions. It represents
  33. // the rate-limiting result, shows whether the lease was acquired or
  34. // contains a rejection reason
  35. //
  36. // Type: Enum
  37. // RequirementLevel: Required
  38. // Stability: stable
  39. // Examples: 'acquired', 'request_canceled'
  40. AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result")
  41. // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to
  42. // the "aspnetcore.diagnostics.handler.type" semantic conventions. It
  43. // represents the full type name of the
  44. // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
  45. // implementation that handled the exception.
  46. //
  47. // Type: string
  48. // RequirementLevel: ConditionallyRequired (if and only if the exception
  49. // was handled by this handler.)
  50. // Stability: stable
  51. // Examples: 'Contoso.MyHandler'
  52. AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type")
  53. // AspnetcoreDiagnosticsExceptionResultKey is the attribute Key conforming
  54. // to the "aspnetcore.diagnostics.exception.result" semantic conventions.
  55. // It represents the aSP.NET Core exception middleware handling result
  56. //
  57. // Type: Enum
  58. // RequirementLevel: Optional
  59. // Stability: stable
  60. // Examples: 'handled', 'unhandled'
  61. AspnetcoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result")
  62. // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the
  63. // "aspnetcore.rate_limiting.policy" semantic conventions. It represents
  64. // the rate limiting policy name.
  65. //
  66. // Type: string
  67. // RequirementLevel: Optional
  68. // Stability: stable
  69. // Examples: 'fixed', 'sliding', 'token'
  70. AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy")
  71. // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the
  72. // "aspnetcore.request.is_unhandled" semantic conventions. It represents
  73. // the flag indicating if request was handled by the application pipeline.
  74. //
  75. // Type: boolean
  76. // RequirementLevel: Optional
  77. // Stability: stable
  78. // Examples: True
  79. AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled")
  80. // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the
  81. // "aspnetcore.routing.is_fallback" semantic conventions. It represents a
  82. // value that indicates whether the matched route is a fallback route.
  83. //
  84. // Type: boolean
  85. // RequirementLevel: Optional
  86. // Stability: stable
  87. // Examples: True
  88. AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback")
  89. // AspnetcoreRoutingMatchStatusKey is the attribute Key conforming to the
  90. // "aspnetcore.routing.match_status" semantic conventions. It represents
  91. // the match result - success or failure
  92. //
  93. // Type: Enum
  94. // RequirementLevel: Optional
  95. // Stability: stable
  96. // Examples: 'success', 'failure'
  97. AspnetcoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status")
  98. )
  99. var (
  100. // Lease was acquired
  101. AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired")
  102. // Lease request was rejected by the endpoint limiter
  103. AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter")
  104. // Lease request was rejected by the global limiter
  105. AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter")
  106. // Lease request was canceled
  107. AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled")
  108. )
  109. var (
  110. // Exception was handled by the exception handling middleware
  111. AspnetcoreDiagnosticsExceptionResultHandled = AspnetcoreDiagnosticsExceptionResultKey.String("handled")
  112. // Exception was not handled by the exception handling middleware
  113. AspnetcoreDiagnosticsExceptionResultUnhandled = AspnetcoreDiagnosticsExceptionResultKey.String("unhandled")
  114. // Exception handling was skipped because the response had started
  115. AspnetcoreDiagnosticsExceptionResultSkipped = AspnetcoreDiagnosticsExceptionResultKey.String("skipped")
  116. // Exception handling didn't run because the request was aborted
  117. AspnetcoreDiagnosticsExceptionResultAborted = AspnetcoreDiagnosticsExceptionResultKey.String("aborted")
  118. )
  119. var (
  120. // Match succeeded
  121. AspnetcoreRoutingMatchStatusSuccess = AspnetcoreRoutingMatchStatusKey.String("success")
  122. // Match failed
  123. AspnetcoreRoutingMatchStatusFailure = AspnetcoreRoutingMatchStatusKey.String("failure")
  124. )
  125. // AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming
  126. // to the "aspnetcore.diagnostics.handler.type" semantic conventions. It
  127. // represents the full type name of the
  128. // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
  129. // implementation that handled the exception.
  130. func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue {
  131. return AspnetcoreDiagnosticsHandlerTypeKey.String(val)
  132. }
  133. // AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to
  134. // the "aspnetcore.rate_limiting.policy" semantic conventions. It represents
  135. // the rate limiting policy name.
  136. func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue {
  137. return AspnetcoreRateLimitingPolicyKey.String(val)
  138. }
  139. // AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to
  140. // the "aspnetcore.request.is_unhandled" semantic conventions. It represents
  141. // the flag indicating if request was handled by the application pipeline.
  142. func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue {
  143. return AspnetcoreRequestIsUnhandledKey.Bool(val)
  144. }
  145. // AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to
  146. // the "aspnetcore.routing.is_fallback" semantic conventions. It represents a
  147. // value that indicates whether the matched route is a fallback route.
  148. func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue {
  149. return AspnetcoreRoutingIsFallbackKey.Bool(val)
  150. }
  151. // Generic attributes for AWS services.
  152. const (
  153. // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
  154. // semantic conventions. It represents the AWS request ID as returned in
  155. // the response headers `x-amz-request-id` or `x-amz-requestid`.
  156. //
  157. // Type: string
  158. // RequirementLevel: Optional
  159. // Stability: experimental
  160. // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
  161. AWSRequestIDKey = attribute.Key("aws.request_id")
  162. )
  163. // AWSRequestID returns an attribute KeyValue conforming to the
  164. // "aws.request_id" semantic conventions. It represents the AWS request ID as
  165. // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
  166. func AWSRequestID(val string) attribute.KeyValue {
  167. return AWSRequestIDKey.String(val)
  168. }
  169. // Attributes for AWS DynamoDB.
  170. const (
  171. // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to
  172. // the "aws.dynamodb.attribute_definitions" semantic conventions. It
  173. // represents the JSON-serialized value of each item in the
  174. // `AttributeDefinitions` request field.
  175. //
  176. // Type: string[]
  177. // RequirementLevel: Optional
  178. // Stability: experimental
  179. // Examples: '{ "AttributeName": "string", "AttributeType": "string" }'
  180. AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions")
  181. // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the
  182. // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
  183. // value of the `AttributesToGet` request parameter.
  184. //
  185. // Type: string[]
  186. // RequirementLevel: Optional
  187. // Stability: experimental
  188. // Examples: 'lives', 'id'
  189. AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get")
  190. // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the
  191. // "aws.dynamodb.consistent_read" semantic conventions. It represents the
  192. // value of the `ConsistentRead` request parameter.
  193. //
  194. // Type: boolean
  195. // RequirementLevel: Optional
  196. // Stability: experimental
  197. AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read")
  198. // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the
  199. // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
  200. // JSON-serialized value of each item in the `ConsumedCapacity` response
  201. // field.
  202. //
  203. // Type: string[]
  204. // RequirementLevel: Optional
  205. // Stability: experimental
  206. // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": {
  207. // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number,
  208. // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" :
  209. // { "CapacityUnits": number, "ReadCapacityUnits": number,
  210. // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table":
  211. // { "CapacityUnits": number, "ReadCapacityUnits": number,
  212. // "WriteCapacityUnits": number }, "TableName": "string",
  213. // "WriteCapacityUnits": number }'
  214. AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity")
  215. // AWSDynamoDBCountKey is the attribute Key conforming to the
  216. // "aws.dynamodb.count" semantic conventions. It represents the value of
  217. // the `Count` response parameter.
  218. //
  219. // Type: int
  220. // RequirementLevel: Optional
  221. // Stability: experimental
  222. // Examples: 10
  223. AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count")
  224. // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the
  225. // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents
  226. // the value of the `ExclusiveStartTableName` request parameter.
  227. //
  228. // Type: string
  229. // RequirementLevel: Optional
  230. // Stability: experimental
  231. // Examples: 'Users', 'CatsTable'
  232. AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table")
  233. // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key
  234. // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
  235. // conventions. It represents the JSON-serialized value of each item in the
  236. // `GlobalSecondaryIndexUpdates` request field.
  237. //
  238. // Type: string[]
  239. // RequirementLevel: Optional
  240. // Stability: experimental
  241. // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ {
  242. // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
  243. // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" },
  244. // "ProvisionedThroughput": { "ReadCapacityUnits": number,
  245. // "WriteCapacityUnits": number } }'
  246. AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates")
  247. // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to
  248. // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It
  249. // represents the JSON-serialized value of each item of the
  250. // `GlobalSecondaryIndexes` request field
  251. //
  252. // Type: string[]
  253. // RequirementLevel: Optional
  254. // Stability: experimental
  255. // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName":
  256. // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [
  257. // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": {
  258. // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }'
  259. AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes")
  260. // AWSDynamoDBIndexNameKey is the attribute Key conforming to the
  261. // "aws.dynamodb.index_name" semantic conventions. It represents the value
  262. // of the `IndexName` request parameter.
  263. //
  264. // Type: string
  265. // RequirementLevel: Optional
  266. // Stability: experimental
  267. // Examples: 'name_to_group'
  268. AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name")
  269. // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to
  270. // the "aws.dynamodb.item_collection_metrics" semantic conventions. It
  271. // represents the JSON-serialized value of the `ItemCollectionMetrics`
  272. // response field.
  273. //
  274. // Type: string
  275. // RequirementLevel: Optional
  276. // Stability: experimental
  277. // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B":
  278. // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": {
  279. // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ],
  280. // "NULL": boolean, "S": "string", "SS": [ "string" ] } },
  281. // "SizeEstimateRangeGB": [ number ] } ] }'
  282. AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics")
  283. // AWSDynamoDBLimitKey is the attribute Key conforming to the
  284. // "aws.dynamodb.limit" semantic conventions. It represents the value of
  285. // the `Limit` request parameter.
  286. //
  287. // Type: int
  288. // RequirementLevel: Optional
  289. // Stability: experimental
  290. // Examples: 10
  291. AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit")
  292. // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to
  293. // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
  294. // represents the JSON-serialized value of each item of the
  295. // `LocalSecondaryIndexes` request field.
  296. //
  297. // Type: string[]
  298. // RequirementLevel: Optional
  299. // Stability: experimental
  300. // Examples: '{ "IndexARN": "string", "IndexName": "string",
  301. // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ {
  302. // "AttributeName": "string", "KeyType": "string" } ], "Projection": {
  303. // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }'
  304. AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes")
  305. // AWSDynamoDBProjectionKey is the attribute Key conforming to the
  306. // "aws.dynamodb.projection" semantic conventions. It represents the value
  307. // of the `ProjectionExpression` request parameter.
  308. //
  309. // Type: string
  310. // RequirementLevel: Optional
  311. // Stability: experimental
  312. // Examples: 'Title', 'Title, Price, Color', 'Title, Description,
  313. // RelatedItems, ProductReviews'
  314. AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection")
  315. // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to
  316. // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It
  317. // represents the value of the `ProvisionedThroughput.ReadCapacityUnits`
  318. // request parameter.
  319. //
  320. // Type: double
  321. // RequirementLevel: Optional
  322. // Stability: experimental
  323. // Examples: 1.0, 2.0
  324. AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity")
  325. // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming
  326. // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions.
  327. // It represents the value of the
  328. // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
  329. //
  330. // Type: double
  331. // RequirementLevel: Optional
  332. // Stability: experimental
  333. // Examples: 1.0, 2.0
  334. AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity")
  335. // AWSDynamoDBScanForwardKey is the attribute Key conforming to the
  336. // "aws.dynamodb.scan_forward" semantic conventions. It represents the
  337. // value of the `ScanIndexForward` request parameter.
  338. //
  339. // Type: boolean
  340. // RequirementLevel: Optional
  341. // Stability: experimental
  342. AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward")
  343. // AWSDynamoDBScannedCountKey is the attribute Key conforming to the
  344. // "aws.dynamodb.scanned_count" semantic conventions. It represents the
  345. // value of the `ScannedCount` response parameter.
  346. //
  347. // Type: int
  348. // RequirementLevel: Optional
  349. // Stability: experimental
  350. // Examples: 50
  351. AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count")
  352. // AWSDynamoDBSegmentKey is the attribute Key conforming to the
  353. // "aws.dynamodb.segment" semantic conventions. It represents the value of
  354. // the `Segment` request parameter.
  355. //
  356. // Type: int
  357. // RequirementLevel: Optional
  358. // Stability: experimental
  359. // Examples: 10
  360. AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment")
  361. // AWSDynamoDBSelectKey is the attribute Key conforming to the
  362. // "aws.dynamodb.select" semantic conventions. It represents the value of
  363. // the `Select` request parameter.
  364. //
  365. // Type: string
  366. // RequirementLevel: Optional
  367. // Stability: experimental
  368. // Examples: 'ALL_ATTRIBUTES', 'COUNT'
  369. AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select")
  370. // AWSDynamoDBTableCountKey is the attribute Key conforming to the
  371. // "aws.dynamodb.table_count" semantic conventions. It represents the
  372. // number of items in the `TableNames` response parameter.
  373. //
  374. // Type: int
  375. // RequirementLevel: Optional
  376. // Stability: experimental
  377. // Examples: 20
  378. AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count")
  379. // AWSDynamoDBTableNamesKey is the attribute Key conforming to the
  380. // "aws.dynamodb.table_names" semantic conventions. It represents the keys
  381. // in the `RequestItems` object field.
  382. //
  383. // Type: string[]
  384. // RequirementLevel: Optional
  385. // Stability: experimental
  386. // Examples: 'Users', 'Cats'
  387. AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names")
  388. // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the
  389. // "aws.dynamodb.total_segments" semantic conventions. It represents the
  390. // value of the `TotalSegments` request parameter.
  391. //
  392. // Type: int
  393. // RequirementLevel: Optional
  394. // Stability: experimental
  395. // Examples: 100
  396. AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments")
  397. )
  398. // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming
  399. // to the "aws.dynamodb.attribute_definitions" semantic conventions. It
  400. // represents the JSON-serialized value of each item in the
  401. // `AttributeDefinitions` request field.
  402. func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue {
  403. return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val)
  404. }
  405. // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to
  406. // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the
  407. // value of the `AttributesToGet` request parameter.
  408. func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue {
  409. return AWSDynamoDBAttributesToGetKey.StringSlice(val)
  410. }
  411. // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the
  412. // "aws.dynamodb.consistent_read" semantic conventions. It represents the value
  413. // of the `ConsistentRead` request parameter.
  414. func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue {
  415. return AWSDynamoDBConsistentReadKey.Bool(val)
  416. }
  417. // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to
  418. // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the
  419. // JSON-serialized value of each item in the `ConsumedCapacity` response field.
  420. func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue {
  421. return AWSDynamoDBConsumedCapacityKey.StringSlice(val)
  422. }
  423. // AWSDynamoDBCount returns an attribute KeyValue conforming to the
  424. // "aws.dynamodb.count" semantic conventions. It represents the value of the
  425. // `Count` response parameter.
  426. func AWSDynamoDBCount(val int) attribute.KeyValue {
  427. return AWSDynamoDBCountKey.Int(val)
  428. }
  429. // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming
  430. // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It
  431. // represents the value of the `ExclusiveStartTableName` request parameter.
  432. func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue {
  433. return AWSDynamoDBExclusiveStartTableKey.String(val)
  434. }
  435. // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue
  436. // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic
  437. // conventions. It represents the JSON-serialized value of each item in the
  438. // `GlobalSecondaryIndexUpdates` request field.
  439. func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue {
  440. return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val)
  441. }
  442. // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue
  443. // conforming to the "aws.dynamodb.global_secondary_indexes" semantic
  444. // conventions. It represents the JSON-serialized value of each item of the
  445. // `GlobalSecondaryIndexes` request field
  446. func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue {
  447. return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val)
  448. }
  449. // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the
  450. // "aws.dynamodb.index_name" semantic conventions. It represents the value of
  451. // the `IndexName` request parameter.
  452. func AWSDynamoDBIndexName(val string) attribute.KeyValue {
  453. return AWSDynamoDBIndexNameKey.String(val)
  454. }
  455. // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming
  456. // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It
  457. // represents the JSON-serialized value of the `ItemCollectionMetrics` response
  458. // field.
  459. func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue {
  460. return AWSDynamoDBItemCollectionMetricsKey.String(val)
  461. }
  462. // AWSDynamoDBLimit returns an attribute KeyValue conforming to the
  463. // "aws.dynamodb.limit" semantic conventions. It represents the value of the
  464. // `Limit` request parameter.
  465. func AWSDynamoDBLimit(val int) attribute.KeyValue {
  466. return AWSDynamoDBLimitKey.Int(val)
  467. }
  468. // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming
  469. // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It
  470. // represents the JSON-serialized value of each item of the
  471. // `LocalSecondaryIndexes` request field.
  472. func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue {
  473. return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val)
  474. }
  475. // AWSDynamoDBProjection returns an attribute KeyValue conforming to the
  476. // "aws.dynamodb.projection" semantic conventions. It represents the value of
  477. // the `ProjectionExpression` request parameter.
  478. func AWSDynamoDBProjection(val string) attribute.KeyValue {
  479. return AWSDynamoDBProjectionKey.String(val)
  480. }
  481. // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue
  482. // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic
  483. // conventions. It represents the value of the
  484. // `ProvisionedThroughput.ReadCapacityUnits` request parameter.
  485. func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue {
  486. return AWSDynamoDBProvisionedReadCapacityKey.Float64(val)
  487. }
  488. // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue
  489. // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic
  490. // conventions. It represents the value of the
  491. // `ProvisionedThroughput.WriteCapacityUnits` request parameter.
  492. func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue {
  493. return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val)
  494. }
  495. // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the
  496. // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of
  497. // the `ScanIndexForward` request parameter.
  498. func AWSDynamoDBScanForward(val bool) attribute.KeyValue {
  499. return AWSDynamoDBScanForwardKey.Bool(val)
  500. }
  501. // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the
  502. // "aws.dynamodb.scanned_count" semantic conventions. It represents the value
  503. // of the `ScannedCount` response parameter.
  504. func AWSDynamoDBScannedCount(val int) attribute.KeyValue {
  505. return AWSDynamoDBScannedCountKey.Int(val)
  506. }
  507. // AWSDynamoDBSegment returns an attribute KeyValue conforming to the
  508. // "aws.dynamodb.segment" semantic conventions. It represents the value of the
  509. // `Segment` request parameter.
  510. func AWSDynamoDBSegment(val int) attribute.KeyValue {
  511. return AWSDynamoDBSegmentKey.Int(val)
  512. }
  513. // AWSDynamoDBSelect returns an attribute KeyValue conforming to the
  514. // "aws.dynamodb.select" semantic conventions. It represents the value of the
  515. // `Select` request parameter.
  516. func AWSDynamoDBSelect(val string) attribute.KeyValue {
  517. return AWSDynamoDBSelectKey.String(val)
  518. }
  519. // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the
  520. // "aws.dynamodb.table_count" semantic conventions. It represents the number of
  521. // items in the `TableNames` response parameter.
  522. func AWSDynamoDBTableCount(val int) attribute.KeyValue {
  523. return AWSDynamoDBTableCountKey.Int(val)
  524. }
  525. // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the
  526. // "aws.dynamodb.table_names" semantic conventions. It represents the keys in
  527. // the `RequestItems` object field.
  528. func AWSDynamoDBTableNames(val ...string) attribute.KeyValue {
  529. return AWSDynamoDBTableNamesKey.StringSlice(val)
  530. }
  531. // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the
  532. // "aws.dynamodb.total_segments" semantic conventions. It represents the value
  533. // of the `TotalSegments` request parameter.
  534. func AWSDynamoDBTotalSegments(val int) attribute.KeyValue {
  535. return AWSDynamoDBTotalSegmentsKey.Int(val)
  536. }
  537. // Attributes for AWS Elastic Container Service (ECS).
  538. const (
  539. // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id"
  540. // semantic conventions. It represents the ID of a running ECS task. The ID
  541. // MUST be extracted from `task.arn`.
  542. //
  543. // Type: string
  544. // RequirementLevel: ConditionallyRequired (If and only if `task.arn` is
  545. // populated.)
  546. // Stability: experimental
  547. // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b',
  548. // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
  549. AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id")
  550. // AWSECSClusterARNKey is the attribute Key conforming to the
  551. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an
  552. // [ECS
  553. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  554. //
  555. // Type: string
  556. // RequirementLevel: Optional
  557. // Stability: experimental
  558. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  559. AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn")
  560. // AWSECSContainerARNKey is the attribute Key conforming to the
  561. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  562. // Resource Name (ARN) of an [ECS container
  563. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  564. //
  565. // Type: string
  566. // RequirementLevel: Optional
  567. // Stability: experimental
  568. // Examples:
  569. // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9'
  570. AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn")
  571. // AWSECSLaunchtypeKey is the attribute Key conforming to the
  572. // "aws.ecs.launchtype" semantic conventions. It represents the [launch
  573. // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
  574. // for an ECS task.
  575. //
  576. // Type: Enum
  577. // RequirementLevel: Optional
  578. // Stability: experimental
  579. AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype")
  580. // AWSECSTaskARNKey is the attribute Key conforming to the
  581. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a
  582. // running [ECS
  583. // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
  584. //
  585. // Type: string
  586. // RequirementLevel: Optional
  587. // Stability: experimental
  588. // Examples:
  589. // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b',
  590. // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd'
  591. AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn")
  592. // AWSECSTaskFamilyKey is the attribute Key conforming to the
  593. // "aws.ecs.task.family" semantic conventions. It represents the family
  594. // name of the [ECS task
  595. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
  596. // used to create the ECS task.
  597. //
  598. // Type: string
  599. // RequirementLevel: Optional
  600. // Stability: experimental
  601. // Examples: 'opentelemetry-family'
  602. AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family")
  603. // AWSECSTaskRevisionKey is the attribute Key conforming to the
  604. // "aws.ecs.task.revision" semantic conventions. It represents the revision
  605. // for the task definition used to create the ECS task.
  606. //
  607. // Type: string
  608. // RequirementLevel: Optional
  609. // Stability: experimental
  610. // Examples: '8', '26'
  611. AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision")
  612. )
  613. var (
  614. // ec2
  615. AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2")
  616. // fargate
  617. AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate")
  618. )
  619. // AWSECSTaskID returns an attribute KeyValue conforming to the
  620. // "aws.ecs.task.id" semantic conventions. It represents the ID of a running
  621. // ECS task. The ID MUST be extracted from `task.arn`.
  622. func AWSECSTaskID(val string) attribute.KeyValue {
  623. return AWSECSTaskIDKey.String(val)
  624. }
  625. // AWSECSClusterARN returns an attribute KeyValue conforming to the
  626. // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS
  627. // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).
  628. func AWSECSClusterARN(val string) attribute.KeyValue {
  629. return AWSECSClusterARNKey.String(val)
  630. }
  631. // AWSECSContainerARN returns an attribute KeyValue conforming to the
  632. // "aws.ecs.container.arn" semantic conventions. It represents the Amazon
  633. // Resource Name (ARN) of an [ECS container
  634. // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).
  635. func AWSECSContainerARN(val string) attribute.KeyValue {
  636. return AWSECSContainerARNKey.String(val)
  637. }
  638. // AWSECSTaskARN returns an attribute KeyValue conforming to the
  639. // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running
  640. // [ECS
  641. // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids).
  642. func AWSECSTaskARN(val string) attribute.KeyValue {
  643. return AWSECSTaskARNKey.String(val)
  644. }
  645. // AWSECSTaskFamily returns an attribute KeyValue conforming to the
  646. // "aws.ecs.task.family" semantic conventions. It represents the family name of
  647. // the [ECS task
  648. // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html)
  649. // used to create the ECS task.
  650. func AWSECSTaskFamily(val string) attribute.KeyValue {
  651. return AWSECSTaskFamilyKey.String(val)
  652. }
  653. // AWSECSTaskRevision returns an attribute KeyValue conforming to the
  654. // "aws.ecs.task.revision" semantic conventions. It represents the revision for
  655. // the task definition used to create the ECS task.
  656. func AWSECSTaskRevision(val string) attribute.KeyValue {
  657. return AWSECSTaskRevisionKey.String(val)
  658. }
  659. // Attributes for AWS Elastic Kubernetes Service (EKS).
  660. const (
  661. // AWSEKSClusterARNKey is the attribute Key conforming to the
  662. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an
  663. // EKS cluster.
  664. //
  665. // Type: string
  666. // RequirementLevel: Optional
  667. // Stability: experimental
  668. // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster'
  669. AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn")
  670. )
  671. // AWSEKSClusterARN returns an attribute KeyValue conforming to the
  672. // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS
  673. // cluster.
  674. func AWSEKSClusterARN(val string) attribute.KeyValue {
  675. return AWSEKSClusterARNKey.String(val)
  676. }
  677. // Attributes for AWS Logs.
  678. const (
  679. // AWSLogGroupARNsKey is the attribute Key conforming to the
  680. // "aws.log.group.arns" semantic conventions. It represents the Amazon
  681. // Resource Name(s) (ARN) of the AWS log group(s).
  682. //
  683. // Type: string[]
  684. // RequirementLevel: Optional
  685. // Stability: experimental
  686. // Examples:
  687. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*'
  688. // Note: See the [log group ARN format
  689. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  690. AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns")
  691. // AWSLogGroupNamesKey is the attribute Key conforming to the
  692. // "aws.log.group.names" semantic conventions. It represents the name(s) of
  693. // the AWS log group(s) an application is writing to.
  694. //
  695. // Type: string[]
  696. // RequirementLevel: Optional
  697. // Stability: experimental
  698. // Examples: '/aws/lambda/my-function', 'opentelemetry-service'
  699. // Note: Multiple log groups must be supported for cases like
  700. // multi-container applications, where a single application has sidecar
  701. // containers, and each write to their own log group.
  702. AWSLogGroupNamesKey = attribute.Key("aws.log.group.names")
  703. // AWSLogStreamARNsKey is the attribute Key conforming to the
  704. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of
  705. // the AWS log stream(s).
  706. //
  707. // Type: string[]
  708. // RequirementLevel: Optional
  709. // Stability: experimental
  710. // Examples:
  711. // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  712. // Note: See the [log stream ARN format
  713. // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).
  714. // One log group can contain several log streams, so these ARNs necessarily
  715. // identify both a log group and a log stream.
  716. AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns")
  717. // AWSLogStreamNamesKey is the attribute Key conforming to the
  718. // "aws.log.stream.names" semantic conventions. It represents the name(s)
  719. // of the AWS log stream(s) an application is writing to.
  720. //
  721. // Type: string[]
  722. // RequirementLevel: Optional
  723. // Stability: experimental
  724. // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b'
  725. AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names")
  726. )
  727. // AWSLogGroupARNs returns an attribute KeyValue conforming to the
  728. // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource
  729. // Name(s) (ARN) of the AWS log group(s).
  730. func AWSLogGroupARNs(val ...string) attribute.KeyValue {
  731. return AWSLogGroupARNsKey.StringSlice(val)
  732. }
  733. // AWSLogGroupNames returns an attribute KeyValue conforming to the
  734. // "aws.log.group.names" semantic conventions. It represents the name(s) of the
  735. // AWS log group(s) an application is writing to.
  736. func AWSLogGroupNames(val ...string) attribute.KeyValue {
  737. return AWSLogGroupNamesKey.StringSlice(val)
  738. }
  739. // AWSLogStreamARNs returns an attribute KeyValue conforming to the
  740. // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the
  741. // AWS log stream(s).
  742. func AWSLogStreamARNs(val ...string) attribute.KeyValue {
  743. return AWSLogStreamARNsKey.StringSlice(val)
  744. }
  745. // AWSLogStreamNames returns an attribute KeyValue conforming to the
  746. // "aws.log.stream.names" semantic conventions. It represents the name(s) of
  747. // the AWS log stream(s) an application is writing to.
  748. func AWSLogStreamNames(val ...string) attribute.KeyValue {
  749. return AWSLogStreamNamesKey.StringSlice(val)
  750. }
  751. // Attributes for AWS Lambda.
  752. const (
  753. // AWSLambdaInvokedARNKey is the attribute Key conforming to the
  754. // "aws.lambda.invoked_arn" semantic conventions. It represents the full
  755. // invoked ARN as provided on the `Context` passed to the function
  756. // (`Lambda-Runtime-Invoked-Function-ARN` header on the
  757. // `/runtime/invocation/next` applicable).
  758. //
  759. // Type: string
  760. // RequirementLevel: Optional
  761. // Stability: experimental
  762. // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
  763. // Note: This may be different from `cloud.resource_id` if an alias is
  764. // involved.
  765. AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
  766. )
  767. // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
  768. // "aws.lambda.invoked_arn" semantic conventions. It represents the full
  769. // invoked ARN as provided on the `Context` passed to the function
  770. // (`Lambda-Runtime-Invoked-Function-ARN` header on the
  771. // `/runtime/invocation/next` applicable).
  772. func AWSLambdaInvokedARN(val string) attribute.KeyValue {
  773. return AWSLambdaInvokedARNKey.String(val)
  774. }
  775. // Attributes for AWS S3.
  776. const (
  777. // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
  778. // semantic conventions. It represents the S3 bucket name the request
  779. // refers to. Corresponds to the `--bucket` parameter of the [S3
  780. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
  781. // operations.
  782. //
  783. // Type: string
  784. // RequirementLevel: Optional
  785. // Stability: experimental
  786. // Examples: 'some-bucket-name'
  787. // Note: The `bucket` attribute is applicable to all S3 operations that
  788. // reference a bucket, i.e. that require the bucket name as a mandatory
  789. // parameter.
  790. // This applies to almost all S3 operations except `list-buckets`.
  791. AWSS3BucketKey = attribute.Key("aws.s3.bucket")
  792. // AWSS3CopySourceKey is the attribute Key conforming to the
  793. // "aws.s3.copy_source" semantic conventions. It represents the source
  794. // object (in the form `bucket`/`key`) for the copy operation.
  795. //
  796. // Type: string
  797. // RequirementLevel: Optional
  798. // Stability: experimental
  799. // Examples: 'someFile.yml'
  800. // Note: The `copy_source` attribute applies to S3 copy operations and
  801. // corresponds to the `--copy-source` parameter
  802. // of the [copy-object operation within the S3
  803. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
  804. // This applies in particular to the following operations:
  805. //
  806. // -
  807. // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
  808. // -
  809. // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
  810. AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
  811. // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
  812. // semantic conventions. It represents the delete request container that
  813. // specifies the objects to be deleted.
  814. //
  815. // Type: string
  816. // RequirementLevel: Optional
  817. // Stability: experimental
  818. // Examples:
  819. // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
  820. // Note: The `delete` attribute is only applicable to the
  821. // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
  822. // operation.
  823. // The `delete` attribute corresponds to the `--delete` parameter of the
  824. // [delete-objects operation within the S3
  825. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
  826. AWSS3DeleteKey = attribute.Key("aws.s3.delete")
  827. // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
  828. // conventions. It represents the S3 object key the request refers to.
  829. // Corresponds to the `--key` parameter of the [S3
  830. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
  831. // operations.
  832. //
  833. // Type: string
  834. // RequirementLevel: Optional
  835. // Stability: experimental
  836. // Examples: 'someFile.yml'
  837. // Note: The `key` attribute is applicable to all object-related S3
  838. // operations, i.e. that require the object key as a mandatory parameter.
  839. // This applies in particular to the following operations:
  840. //
  841. // -
  842. // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
  843. // -
  844. // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
  845. // -
  846. // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
  847. // -
  848. // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
  849. // -
  850. // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
  851. // -
  852. // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
  853. // -
  854. // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
  855. // -
  856. // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
  857. // -
  858. // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
  859. // -
  860. // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
  861. // -
  862. // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
  863. // -
  864. // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
  865. // -
  866. // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
  867. AWSS3KeyKey = attribute.Key("aws.s3.key")
  868. // AWSS3PartNumberKey is the attribute Key conforming to the
  869. // "aws.s3.part_number" semantic conventions. It represents the part number
  870. // of the part being uploaded in a multipart-upload operation. This is a
  871. // positive integer between 1 and 10,000.
  872. //
  873. // Type: int
  874. // RequirementLevel: Optional
  875. // Stability: experimental
  876. // Examples: 3456
  877. // Note: The `part_number` attribute is only applicable to the
  878. // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
  879. // and
  880. // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
  881. // operations.
  882. // The `part_number` attribute corresponds to the `--part-number` parameter
  883. // of the
  884. // [upload-part operation within the S3
  885. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
  886. AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
  887. // AWSS3UploadIDKey is the attribute Key conforming to the
  888. // "aws.s3.upload_id" semantic conventions. It represents the upload ID
  889. // that identifies the multipart upload.
  890. //
  891. // Type: string
  892. // RequirementLevel: Optional
  893. // Stability: experimental
  894. // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
  895. // Note: The `upload_id` attribute applies to S3 multipart-upload
  896. // operations and corresponds to the `--upload-id` parameter
  897. // of the [S3
  898. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
  899. // multipart operations.
  900. // This applies in particular to the following operations:
  901. //
  902. // -
  903. // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
  904. // -
  905. // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
  906. // -
  907. // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
  908. // -
  909. // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
  910. // -
  911. // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
  912. AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
  913. )
  914. // AWSS3Bucket returns an attribute KeyValue conforming to the
  915. // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
  916. // request refers to. Corresponds to the `--bucket` parameter of the [S3
  917. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
  918. // operations.
  919. func AWSS3Bucket(val string) attribute.KeyValue {
  920. return AWSS3BucketKey.String(val)
  921. }
  922. // AWSS3CopySource returns an attribute KeyValue conforming to the
  923. // "aws.s3.copy_source" semantic conventions. It represents the source object
  924. // (in the form `bucket`/`key`) for the copy operation.
  925. func AWSS3CopySource(val string) attribute.KeyValue {
  926. return AWSS3CopySourceKey.String(val)
  927. }
  928. // AWSS3Delete returns an attribute KeyValue conforming to the
  929. // "aws.s3.delete" semantic conventions. It represents the delete request
  930. // container that specifies the objects to be deleted.
  931. func AWSS3Delete(val string) attribute.KeyValue {
  932. return AWSS3DeleteKey.String(val)
  933. }
  934. // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
  935. // semantic conventions. It represents the S3 object key the request refers to.
  936. // Corresponds to the `--key` parameter of the [S3
  937. // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
  938. // operations.
  939. func AWSS3Key(val string) attribute.KeyValue {
  940. return AWSS3KeyKey.String(val)
  941. }
  942. // AWSS3PartNumber returns an attribute KeyValue conforming to the
  943. // "aws.s3.part_number" semantic conventions. It represents the part number of
  944. // the part being uploaded in a multipart-upload operation. This is a positive
  945. // integer between 1 and 10,000.
  946. func AWSS3PartNumber(val int) attribute.KeyValue {
  947. return AWSS3PartNumberKey.Int(val)
  948. }
  949. // AWSS3UploadID returns an attribute KeyValue conforming to the
  950. // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
  951. // identifies the multipart upload.
  952. func AWSS3UploadID(val string) attribute.KeyValue {
  953. return AWSS3UploadIDKey.String(val)
  954. }
  955. // The web browser attributes
  956. const (
  957. // BrowserBrandsKey is the attribute Key conforming to the "browser.brands"
  958. // semantic conventions. It represents the array of brand name and version
  959. // separated by a space
  960. //
  961. // Type: string[]
  962. // RequirementLevel: Optional
  963. // Stability: experimental
  964. // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99'
  965. // Note: This value is intended to be taken from the [UA client hints
  966. // API](https://wicg.github.io/ua-client-hints/#interface)
  967. // (`navigator.userAgentData.brands`).
  968. BrowserBrandsKey = attribute.Key("browser.brands")
  969. // BrowserLanguageKey is the attribute Key conforming to the
  970. // "browser.language" semantic conventions. It represents the preferred
  971. // language of the user using the browser
  972. //
  973. // Type: string
  974. // RequirementLevel: Optional
  975. // Stability: experimental
  976. // Examples: 'en', 'en-US', 'fr', 'fr-FR'
  977. // Note: This value is intended to be taken from the Navigator API
  978. // `navigator.language`.
  979. BrowserLanguageKey = attribute.Key("browser.language")
  980. // BrowserMobileKey is the attribute Key conforming to the "browser.mobile"
  981. // semantic conventions. It represents a boolean that is true if the
  982. // browser is running on a mobile device
  983. //
  984. // Type: boolean
  985. // RequirementLevel: Optional
  986. // Stability: experimental
  987. // Note: This value is intended to be taken from the [UA client hints
  988. // API](https://wicg.github.io/ua-client-hints/#interface)
  989. // (`navigator.userAgentData.mobile`). If unavailable, this attribute
  990. // SHOULD be left unset.
  991. BrowserMobileKey = attribute.Key("browser.mobile")
  992. // BrowserPlatformKey is the attribute Key conforming to the
  993. // "browser.platform" semantic conventions. It represents the platform on
  994. // which the browser is running
  995. //
  996. // Type: string
  997. // RequirementLevel: Optional
  998. // Stability: experimental
  999. // Examples: 'Windows', 'macOS', 'Android'
  1000. // Note: This value is intended to be taken from the [UA client hints
  1001. // API](https://wicg.github.io/ua-client-hints/#interface)
  1002. // (`navigator.userAgentData.platform`). If unavailable, the legacy
  1003. // `navigator.platform` API SHOULD NOT be used instead and this attribute
  1004. // SHOULD be left unset in order for the values to be consistent.
  1005. // The list of possible values is defined in the [W3C User-Agent Client
  1006. // Hints
  1007. // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform).
  1008. // Note that some (but not all) of these values can overlap with values in
  1009. // the [`os.type` and `os.name` attributes](./os.md). However, for
  1010. // consistency, the values in the `browser.platform` attribute should
  1011. // capture the exact value that the user agent provides.
  1012. BrowserPlatformKey = attribute.Key("browser.platform")
  1013. )
  1014. // BrowserBrands returns an attribute KeyValue conforming to the
  1015. // "browser.brands" semantic conventions. It represents the array of brand name
  1016. // and version separated by a space
  1017. func BrowserBrands(val ...string) attribute.KeyValue {
  1018. return BrowserBrandsKey.StringSlice(val)
  1019. }
  1020. // BrowserLanguage returns an attribute KeyValue conforming to the
  1021. // "browser.language" semantic conventions. It represents the preferred
  1022. // language of the user using the browser
  1023. func BrowserLanguage(val string) attribute.KeyValue {
  1024. return BrowserLanguageKey.String(val)
  1025. }
  1026. // BrowserMobile returns an attribute KeyValue conforming to the
  1027. // "browser.mobile" semantic conventions. It represents a boolean that is true
  1028. // if the browser is running on a mobile device
  1029. func BrowserMobile(val bool) attribute.KeyValue {
  1030. return BrowserMobileKey.Bool(val)
  1031. }
  1032. // BrowserPlatform returns an attribute KeyValue conforming to the
  1033. // "browser.platform" semantic conventions. It represents the platform on which
  1034. // the browser is running
  1035. func BrowserPlatform(val string) attribute.KeyValue {
  1036. return BrowserPlatformKey.String(val)
  1037. }
  1038. // These attributes may be used to describe the client in a connection-based
  1039. // network interaction where there is one side that initiates the connection
  1040. // (the client is the side that initiates the connection). This covers all TCP
  1041. // network interactions since TCP is connection-based and one side initiates
  1042. // the connection (an exception is made for peer-to-peer communication over TCP
  1043. // where the "user-facing" surface of the protocol / API doesn't expose a clear
  1044. // notion of client and server). This also covers UDP network interactions
  1045. // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
  1046. const (
  1047. // ClientAddressKey is the attribute Key conforming to the "client.address"
  1048. // semantic conventions. It represents the client address - domain name if
  1049. // available without reverse DNS lookup; otherwise, IP address or Unix
  1050. // domain socket name.
  1051. //
  1052. // Type: string
  1053. // RequirementLevel: Optional
  1054. // Stability: stable
  1055. // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock'
  1056. // Note: When observed from the server side, and when communicating through
  1057. // an intermediary, `client.address` SHOULD represent the client address
  1058. // behind any intermediaries, for example proxies, if it's available.
  1059. ClientAddressKey = attribute.Key("client.address")
  1060. // ClientPortKey is the attribute Key conforming to the "client.port"
  1061. // semantic conventions. It represents the client port number.
  1062. //
  1063. // Type: int
  1064. // RequirementLevel: Optional
  1065. // Stability: stable
  1066. // Examples: 65123
  1067. // Note: When observed from the server side, and when communicating through
  1068. // an intermediary, `client.port` SHOULD represent the client port behind
  1069. // any intermediaries, for example proxies, if it's available.
  1070. ClientPortKey = attribute.Key("client.port")
  1071. )
  1072. // ClientAddress returns an attribute KeyValue conforming to the
  1073. // "client.address" semantic conventions. It represents the client address -
  1074. // domain name if available without reverse DNS lookup; otherwise, IP address
  1075. // or Unix domain socket name.
  1076. func ClientAddress(val string) attribute.KeyValue {
  1077. return ClientAddressKey.String(val)
  1078. }
  1079. // ClientPort returns an attribute KeyValue conforming to the "client.port"
  1080. // semantic conventions. It represents the client port number.
  1081. func ClientPort(val int) attribute.KeyValue {
  1082. return ClientPortKey.Int(val)
  1083. }
  1084. // A cloud environment (e.g. GCP, Azure, AWS).
  1085. const (
  1086. // CloudAccountIDKey is the attribute Key conforming to the
  1087. // "cloud.account.id" semantic conventions. It represents the cloud account
  1088. // ID the resource is assigned to.
  1089. //
  1090. // Type: string
  1091. // RequirementLevel: Optional
  1092. // Stability: experimental
  1093. // Examples: '111111111111', 'opentelemetry'
  1094. CloudAccountIDKey = attribute.Key("cloud.account.id")
  1095. // CloudAvailabilityZoneKey is the attribute Key conforming to the
  1096. // "cloud.availability_zone" semantic conventions. It represents the cloud
  1097. // regions often have multiple, isolated locations known as zones to
  1098. // increase availability. Availability zone represents the zone where the
  1099. // resource is running.
  1100. //
  1101. // Type: string
  1102. // RequirementLevel: Optional
  1103. // Stability: experimental
  1104. // Examples: 'us-east-1c'
  1105. // Note: Availability zones are called "zones" on Alibaba Cloud and Google
  1106. // Cloud.
  1107. CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone")
  1108. // CloudPlatformKey is the attribute Key conforming to the "cloud.platform"
  1109. // semantic conventions. It represents the cloud platform in use.
  1110. //
  1111. // Type: Enum
  1112. // RequirementLevel: Optional
  1113. // Stability: experimental
  1114. // Note: The prefix of the service SHOULD match the one specified in
  1115. // `cloud.provider`.
  1116. CloudPlatformKey = attribute.Key("cloud.platform")
  1117. // CloudProviderKey is the attribute Key conforming to the "cloud.provider"
  1118. // semantic conventions. It represents the name of the cloud provider.
  1119. //
  1120. // Type: Enum
  1121. // RequirementLevel: Optional
  1122. // Stability: experimental
  1123. CloudProviderKey = attribute.Key("cloud.provider")
  1124. // CloudRegionKey is the attribute Key conforming to the "cloud.region"
  1125. // semantic conventions. It represents the geographical region the resource
  1126. // is running.
  1127. //
  1128. // Type: string
  1129. // RequirementLevel: Optional
  1130. // Stability: experimental
  1131. // Examples: 'us-central1', 'us-east-1'
  1132. // Note: Refer to your provider's docs to see the available regions, for
  1133. // example [Alibaba Cloud
  1134. // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS
  1135. // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/),
  1136. // [Azure
  1137. // regions](https://azure.microsoft.com/global-infrastructure/geographies/),
  1138. // [Google Cloud regions](https://cloud.google.com/about/locations), or
  1139. // [Tencent Cloud
  1140. // regions](https://www.tencentcloud.com/document/product/213/6091).
  1141. CloudRegionKey = attribute.Key("cloud.region")
  1142. // CloudResourceIDKey is the attribute Key conforming to the
  1143. // "cloud.resource_id" semantic conventions. It represents the cloud
  1144. // provider-specific native identifier of the monitored cloud resource
  1145. // (e.g. an
  1146. // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
  1147. // on AWS, a [fully qualified resource
  1148. // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id)
  1149. // on Azure, a [full resource
  1150. // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  1151. // on GCP)
  1152. //
  1153. // Type: string
  1154. // RequirementLevel: Optional
  1155. // Stability: experimental
  1156. // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function',
  1157. // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID',
  1158. // '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>'
  1159. // Note: On some cloud providers, it may not be possible to determine the
  1160. // full ID at startup,
  1161. // so it may be necessary to set `cloud.resource_id` as a span attribute
  1162. // instead.
  1163. //
  1164. // The exact value to use for `cloud.resource_id` depends on the cloud
  1165. // provider.
  1166. // The following well-known definitions MUST be used if you set this
  1167. // attribute and they apply:
  1168. //
  1169. // * **AWS Lambda:** The function
  1170. // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  1171. // Take care not to use the "invoked ARN" directly but replace any
  1172. // [alias
  1173. // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html)
  1174. // with the resolved function version, as the same runtime instance may
  1175. // be invokable with
  1176. // multiple different aliases.
  1177. // * **GCP:** The [URI of the
  1178. // resource](https://cloud.google.com/iam/docs/full-resource-names)
  1179. // * **Azure:** The [Fully Qualified Resource
  1180. // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id)
  1181. // of the invoked function,
  1182. // *not* the function app, having the form
  1183. // `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`.
  1184. // This means that a span attribute MUST be used, as an Azure function
  1185. // app can host multiple functions that would usually share
  1186. // a TracerProvider.
  1187. CloudResourceIDKey = attribute.Key("cloud.resource_id")
  1188. )
  1189. var (
  1190. // Alibaba Cloud Elastic Compute Service
  1191. CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs")
  1192. // Alibaba Cloud Function Compute
  1193. CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc")
  1194. // Red Hat OpenShift on Alibaba Cloud
  1195. CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift")
  1196. // AWS Elastic Compute Cloud
  1197. CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2")
  1198. // AWS Elastic Container Service
  1199. CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs")
  1200. // AWS Elastic Kubernetes Service
  1201. CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks")
  1202. // AWS Lambda
  1203. CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda")
  1204. // AWS Elastic Beanstalk
  1205. CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk")
  1206. // AWS App Runner
  1207. CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner")
  1208. // Red Hat OpenShift on AWS (ROSA)
  1209. CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift")
  1210. // Azure Virtual Machines
  1211. CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm")
  1212. // Azure Container Apps
  1213. CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps")
  1214. // Azure Container Instances
  1215. CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances")
  1216. // Azure Kubernetes Service
  1217. CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks")
  1218. // Azure Functions
  1219. CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions")
  1220. // Azure App Service
  1221. CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service")
  1222. // Azure Red Hat OpenShift
  1223. CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift")
  1224. // Google Bare Metal Solution (BMS)
  1225. CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution")
  1226. // Google Cloud Compute Engine (GCE)
  1227. CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine")
  1228. // Google Cloud Run
  1229. CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run")
  1230. // Google Cloud Kubernetes Engine (GKE)
  1231. CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine")
  1232. // Google Cloud Functions (GCF)
  1233. CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions")
  1234. // Google Cloud App Engine (GAE)
  1235. CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine")
  1236. // Red Hat OpenShift on Google Cloud
  1237. CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift")
  1238. // Red Hat OpenShift on IBM Cloud
  1239. CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift")
  1240. // Tencent Cloud Cloud Virtual Machine (CVM)
  1241. CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm")
  1242. // Tencent Cloud Elastic Kubernetes Service (EKS)
  1243. CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks")
  1244. // Tencent Cloud Serverless Cloud Function (SCF)
  1245. CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf")
  1246. )
  1247. var (
  1248. // Alibaba Cloud
  1249. CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud")
  1250. // Amazon Web Services
  1251. CloudProviderAWS = CloudProviderKey.String("aws")
  1252. // Microsoft Azure
  1253. CloudProviderAzure = CloudProviderKey.String("azure")
  1254. // Google Cloud Platform
  1255. CloudProviderGCP = CloudProviderKey.String("gcp")
  1256. // Heroku Platform as a Service
  1257. CloudProviderHeroku = CloudProviderKey.String("heroku")
  1258. // IBM Cloud
  1259. CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud")
  1260. // Tencent Cloud
  1261. CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud")
  1262. )
  1263. // CloudAccountID returns an attribute KeyValue conforming to the
  1264. // "cloud.account.id" semantic conventions. It represents the cloud account ID
  1265. // the resource is assigned to.
  1266. func CloudAccountID(val string) attribute.KeyValue {
  1267. return CloudAccountIDKey.String(val)
  1268. }
  1269. // CloudAvailabilityZone returns an attribute KeyValue conforming to the
  1270. // "cloud.availability_zone" semantic conventions. It represents the cloud
  1271. // regions often have multiple, isolated locations known as zones to increase
  1272. // availability. Availability zone represents the zone where the resource is
  1273. // running.
  1274. func CloudAvailabilityZone(val string) attribute.KeyValue {
  1275. return CloudAvailabilityZoneKey.String(val)
  1276. }
  1277. // CloudRegion returns an attribute KeyValue conforming to the
  1278. // "cloud.region" semantic conventions. It represents the geographical region
  1279. // the resource is running.
  1280. func CloudRegion(val string) attribute.KeyValue {
  1281. return CloudRegionKey.String(val)
  1282. }
  1283. // CloudResourceID returns an attribute KeyValue conforming to the
  1284. // "cloud.resource_id" semantic conventions. It represents the cloud
  1285. // provider-specific native identifier of the monitored cloud resource (e.g. an
  1286. // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
  1287. // on AWS, a [fully qualified resource
  1288. // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on
  1289. // Azure, a [full resource
  1290. // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
  1291. // on GCP)
  1292. func CloudResourceID(val string) attribute.KeyValue {
  1293. return CloudResourceIDKey.String(val)
  1294. }
  1295. // Attributes for CloudEvents.
  1296. const (
  1297. // CloudeventsEventIDKey is the attribute Key conforming to the
  1298. // "cloudevents.event_id" semantic conventions. It represents the
  1299. // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
  1300. // uniquely identifies the event.
  1301. //
  1302. // Type: string
  1303. // RequirementLevel: Optional
  1304. // Stability: experimental
  1305. // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001'
  1306. CloudeventsEventIDKey = attribute.Key("cloudevents.event_id")
  1307. // CloudeventsEventSourceKey is the attribute Key conforming to the
  1308. // "cloudevents.event_source" semantic conventions. It represents the
  1309. // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
  1310. // identifies the context in which an event happened.
  1311. //
  1312. // Type: string
  1313. // RequirementLevel: Optional
  1314. // Stability: experimental
  1315. // Examples: 'https://github.com/cloudevents',
  1316. // '/cloudevents/spec/pull/123', 'my-service'
  1317. CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source")
  1318. // CloudeventsEventSpecVersionKey is the attribute Key conforming to the
  1319. // "cloudevents.event_spec_version" semantic conventions. It represents the
  1320. // [version of the CloudEvents
  1321. // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
  1322. // which the event uses.
  1323. //
  1324. // Type: string
  1325. // RequirementLevel: Optional
  1326. // Stability: experimental
  1327. // Examples: '1.0'
  1328. CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version")
  1329. // CloudeventsEventSubjectKey is the attribute Key conforming to the
  1330. // "cloudevents.event_subject" semantic conventions. It represents the
  1331. // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
  1332. // of the event in the context of the event producer (identified by
  1333. // source).
  1334. //
  1335. // Type: string
  1336. // RequirementLevel: Optional
  1337. // Stability: experimental
  1338. // Examples: 'mynewfile.jpg'
  1339. CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject")
  1340. // CloudeventsEventTypeKey is the attribute Key conforming to the
  1341. // "cloudevents.event_type" semantic conventions. It represents the
  1342. // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
  1343. // contains a value describing the type of event related to the originating
  1344. // occurrence.
  1345. //
  1346. // Type: string
  1347. // RequirementLevel: Optional
  1348. // Stability: experimental
  1349. // Examples: 'com.github.pull_request.opened',
  1350. // 'com.example.object.deleted.v2'
  1351. CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type")
  1352. )
  1353. // CloudeventsEventID returns an attribute KeyValue conforming to the
  1354. // "cloudevents.event_id" semantic conventions. It represents the
  1355. // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id)
  1356. // uniquely identifies the event.
  1357. func CloudeventsEventID(val string) attribute.KeyValue {
  1358. return CloudeventsEventIDKey.String(val)
  1359. }
  1360. // CloudeventsEventSource returns an attribute KeyValue conforming to the
  1361. // "cloudevents.event_source" semantic conventions. It represents the
  1362. // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1)
  1363. // identifies the context in which an event happened.
  1364. func CloudeventsEventSource(val string) attribute.KeyValue {
  1365. return CloudeventsEventSourceKey.String(val)
  1366. }
  1367. // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to
  1368. // the "cloudevents.event_spec_version" semantic conventions. It represents the
  1369. // [version of the CloudEvents
  1370. // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion)
  1371. // which the event uses.
  1372. func CloudeventsEventSpecVersion(val string) attribute.KeyValue {
  1373. return CloudeventsEventSpecVersionKey.String(val)
  1374. }
  1375. // CloudeventsEventSubject returns an attribute KeyValue conforming to the
  1376. // "cloudevents.event_subject" semantic conventions. It represents the
  1377. // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject)
  1378. // of the event in the context of the event producer (identified by source).
  1379. func CloudeventsEventSubject(val string) attribute.KeyValue {
  1380. return CloudeventsEventSubjectKey.String(val)
  1381. }
  1382. // CloudeventsEventType returns an attribute KeyValue conforming to the
  1383. // "cloudevents.event_type" semantic conventions. It represents the
  1384. // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type)
  1385. // contains a value describing the type of event related to the originating
  1386. // occurrence.
  1387. func CloudeventsEventType(val string) attribute.KeyValue {
  1388. return CloudeventsEventTypeKey.String(val)
  1389. }
  1390. // These attributes allow to report this unit of code and therefore to provide
  1391. // more context about the span.
  1392. const (
  1393. // CodeColumnKey is the attribute Key conforming to the "code.column"
  1394. // semantic conventions. It represents the column number in `code.filepath`
  1395. // best representing the operation. It SHOULD point within the code unit
  1396. // named in `code.function`.
  1397. //
  1398. // Type: int
  1399. // RequirementLevel: Optional
  1400. // Stability: experimental
  1401. // Examples: 16
  1402. CodeColumnKey = attribute.Key("code.column")
  1403. // CodeFilepathKey is the attribute Key conforming to the "code.filepath"
  1404. // semantic conventions. It represents the source code file name that
  1405. // identifies the code unit as uniquely as possible (preferably an absolute
  1406. // file path).
  1407. //
  1408. // Type: string
  1409. // RequirementLevel: Optional
  1410. // Stability: experimental
  1411. // Examples: '/usr/local/MyApplication/content_root/app/index.php'
  1412. CodeFilepathKey = attribute.Key("code.filepath")
  1413. // CodeFunctionKey is the attribute Key conforming to the "code.function"
  1414. // semantic conventions. It represents the method or function name, or
  1415. // equivalent (usually rightmost part of the code unit's name).
  1416. //
  1417. // Type: string
  1418. // RequirementLevel: Optional
  1419. // Stability: experimental
  1420. // Examples: 'serveRequest'
  1421. CodeFunctionKey = attribute.Key("code.function")
  1422. // CodeLineNumberKey is the attribute Key conforming to the "code.lineno"
  1423. // semantic conventions. It represents the line number in `code.filepath`
  1424. // best representing the operation. It SHOULD point within the code unit
  1425. // named in `code.function`.
  1426. //
  1427. // Type: int
  1428. // RequirementLevel: Optional
  1429. // Stability: experimental
  1430. // Examples: 42
  1431. CodeLineNumberKey = attribute.Key("code.lineno")
  1432. // CodeNamespaceKey is the attribute Key conforming to the "code.namespace"
  1433. // semantic conventions. It represents the "namespace" within which
  1434. // `code.function` is defined. Usually the qualified class or module name,
  1435. // such that `code.namespace` + some separator + `code.function` form a
  1436. // unique identifier for the code unit.
  1437. //
  1438. // Type: string
  1439. // RequirementLevel: Optional
  1440. // Stability: experimental
  1441. // Examples: 'com.example.MyHTTPService'
  1442. CodeNamespaceKey = attribute.Key("code.namespace")
  1443. // CodeStacktraceKey is the attribute Key conforming to the
  1444. // "code.stacktrace" semantic conventions. It represents a stacktrace as a
  1445. // string in the natural representation for the language runtime. The
  1446. // representation is to be determined and documented by each language SIG.
  1447. //
  1448. // Type: string
  1449. // RequirementLevel: Optional
  1450. // Stability: experimental
  1451. // Examples: 'at
  1452. // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
  1453. // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
  1454. // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
  1455. CodeStacktraceKey = attribute.Key("code.stacktrace")
  1456. )
  1457. // CodeColumn returns an attribute KeyValue conforming to the "code.column"
  1458. // semantic conventions. It represents the column number in `code.filepath`
  1459. // best representing the operation. It SHOULD point within the code unit named
  1460. // in `code.function`.
  1461. func CodeColumn(val int) attribute.KeyValue {
  1462. return CodeColumnKey.Int(val)
  1463. }
  1464. // CodeFilepath returns an attribute KeyValue conforming to the
  1465. // "code.filepath" semantic conventions. It represents the source code file
  1466. // name that identifies the code unit as uniquely as possible (preferably an
  1467. // absolute file path).
  1468. func CodeFilepath(val string) attribute.KeyValue {
  1469. return CodeFilepathKey.String(val)
  1470. }
  1471. // CodeFunction returns an attribute KeyValue conforming to the
  1472. // "code.function" semantic conventions. It represents the method or function
  1473. // name, or equivalent (usually rightmost part of the code unit's name).
  1474. func CodeFunction(val string) attribute.KeyValue {
  1475. return CodeFunctionKey.String(val)
  1476. }
  1477. // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno"
  1478. // semantic conventions. It represents the line number in `code.filepath` best
  1479. // representing the operation. It SHOULD point within the code unit named in
  1480. // `code.function`.
  1481. func CodeLineNumber(val int) attribute.KeyValue {
  1482. return CodeLineNumberKey.Int(val)
  1483. }
  1484. // CodeNamespace returns an attribute KeyValue conforming to the
  1485. // "code.namespace" semantic conventions. It represents the "namespace" within
  1486. // which `code.function` is defined. Usually the qualified class or module
  1487. // name, such that `code.namespace` + some separator + `code.function` form a
  1488. // unique identifier for the code unit.
  1489. func CodeNamespace(val string) attribute.KeyValue {
  1490. return CodeNamespaceKey.String(val)
  1491. }
  1492. // CodeStacktrace returns an attribute KeyValue conforming to the
  1493. // "code.stacktrace" semantic conventions. It represents a stacktrace as a
  1494. // string in the natural representation for the language runtime. The
  1495. // representation is to be determined and documented by each language SIG.
  1496. func CodeStacktrace(val string) attribute.KeyValue {
  1497. return CodeStacktraceKey.String(val)
  1498. }
  1499. // A container instance.
  1500. const (
  1501. // ContainerCommandKey is the attribute Key conforming to the
  1502. // "container.command" semantic conventions. It represents the command used
  1503. // to run the container (i.e. the command name).
  1504. //
  1505. // Type: string
  1506. // RequirementLevel: Optional
  1507. // Stability: experimental
  1508. // Examples: 'otelcontribcol'
  1509. // Note: If using embedded credentials or sensitive data, it is recommended
  1510. // to remove them to prevent potential leakage.
  1511. ContainerCommandKey = attribute.Key("container.command")
  1512. // ContainerCommandArgsKey is the attribute Key conforming to the
  1513. // "container.command_args" semantic conventions. It represents the all the
  1514. // command arguments (including the command/executable itself) run by the
  1515. // container. [2]
  1516. //
  1517. // Type: string[]
  1518. // RequirementLevel: Optional
  1519. // Stability: experimental
  1520. // Examples: 'otelcontribcol, --config, config.yaml'
  1521. ContainerCommandArgsKey = attribute.Key("container.command_args")
  1522. // ContainerCommandLineKey is the attribute Key conforming to the
  1523. // "container.command_line" semantic conventions. It represents the full
  1524. // command run by the container as a single string representing the full
  1525. // command. [2]
  1526. //
  1527. // Type: string
  1528. // RequirementLevel: Optional
  1529. // Stability: experimental
  1530. // Examples: 'otelcontribcol --config config.yaml'
  1531. ContainerCommandLineKey = attribute.Key("container.command_line")
  1532. // ContainerCPUStateKey is the attribute Key conforming to the
  1533. // "container.cpu.state" semantic conventions. It represents the CPU state
  1534. // for this data point.
  1535. //
  1536. // Type: Enum
  1537. // RequirementLevel: Optional
  1538. // Stability: experimental
  1539. // Examples: 'user', 'kernel'
  1540. ContainerCPUStateKey = attribute.Key("container.cpu.state")
  1541. // ContainerIDKey is the attribute Key conforming to the "container.id"
  1542. // semantic conventions. It represents the container ID. Usually a UUID, as
  1543. // for example used to [identify Docker
  1544. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  1545. // The UUID might be abbreviated.
  1546. //
  1547. // Type: string
  1548. // RequirementLevel: Optional
  1549. // Stability: experimental
  1550. // Examples: 'a3bf90e006b2'
  1551. ContainerIDKey = attribute.Key("container.id")
  1552. // ContainerImageIDKey is the attribute Key conforming to the
  1553. // "container.image.id" semantic conventions. It represents the runtime
  1554. // specific image identifier. Usually a hash algorithm followed by a UUID.
  1555. //
  1556. // Type: string
  1557. // RequirementLevel: Optional
  1558. // Stability: experimental
  1559. // Examples:
  1560. // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f'
  1561. // Note: Docker defines a sha256 of the image id; `container.image.id`
  1562. // corresponds to the `Image` field from the Docker container inspect
  1563. // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect)
  1564. // endpoint.
  1565. // K8S defines a link to the container registry repository with digest
  1566. // `"imageID": "registry.azurecr.io
  1567. // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`.
  1568. // The ID is assigned by the container runtime and can vary in different
  1569. // environments. Consider using `oci.manifest.digest` if it is important to
  1570. // identify the same image in different environments/runtimes.
  1571. ContainerImageIDKey = attribute.Key("container.image.id")
  1572. // ContainerImageNameKey is the attribute Key conforming to the
  1573. // "container.image.name" semantic conventions. It represents the name of
  1574. // the image the container was built on.
  1575. //
  1576. // Type: string
  1577. // RequirementLevel: Optional
  1578. // Stability: experimental
  1579. // Examples: 'gcr.io/opentelemetry/operator'
  1580. ContainerImageNameKey = attribute.Key("container.image.name")
  1581. // ContainerImageRepoDigestsKey is the attribute Key conforming to the
  1582. // "container.image.repo_digests" semantic conventions. It represents the
  1583. // repo digests of the container image as provided by the container
  1584. // runtime.
  1585. //
  1586. // Type: string[]
  1587. // RequirementLevel: Optional
  1588. // Stability: experimental
  1589. // Examples:
  1590. // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb',
  1591. // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578'
  1592. // Note:
  1593. // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect)
  1594. // and
  1595. // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238)
  1596. // report those under the `RepoDigests` field.
  1597. ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests")
  1598. // ContainerImageTagsKey is the attribute Key conforming to the
  1599. // "container.image.tags" semantic conventions. It represents the container
  1600. // image tags. An example can be found in [Docker Image
  1601. // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
  1602. // Should be only the `<tag>` section of the full name for example from
  1603. // `registry.example.com/my-org/my-image:<tag>`.
  1604. //
  1605. // Type: string[]
  1606. // RequirementLevel: Optional
  1607. // Stability: experimental
  1608. // Examples: 'v1.27.1', '3.5.7-0'
  1609. ContainerImageTagsKey = attribute.Key("container.image.tags")
  1610. // ContainerNameKey is the attribute Key conforming to the "container.name"
  1611. // semantic conventions. It represents the container name used by container
  1612. // runtime.
  1613. //
  1614. // Type: string
  1615. // RequirementLevel: Optional
  1616. // Stability: experimental
  1617. // Examples: 'opentelemetry-autoconf'
  1618. ContainerNameKey = attribute.Key("container.name")
  1619. // ContainerRuntimeKey is the attribute Key conforming to the
  1620. // "container.runtime" semantic conventions. It represents the container
  1621. // runtime managing this container.
  1622. //
  1623. // Type: string
  1624. // RequirementLevel: Optional
  1625. // Stability: experimental
  1626. // Examples: 'docker', 'containerd', 'rkt'
  1627. ContainerRuntimeKey = attribute.Key("container.runtime")
  1628. )
  1629. var (
  1630. // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows)
  1631. ContainerCPUStateUser = ContainerCPUStateKey.String("user")
  1632. // When CPU is used by the system (host OS)
  1633. ContainerCPUStateSystem = ContainerCPUStateKey.String("system")
  1634. // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows)
  1635. ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel")
  1636. )
  1637. // ContainerCommand returns an attribute KeyValue conforming to the
  1638. // "container.command" semantic conventions. It represents the command used to
  1639. // run the container (i.e. the command name).
  1640. func ContainerCommand(val string) attribute.KeyValue {
  1641. return ContainerCommandKey.String(val)
  1642. }
  1643. // ContainerCommandArgs returns an attribute KeyValue conforming to the
  1644. // "container.command_args" semantic conventions. It represents the all the
  1645. // command arguments (including the command/executable itself) run by the
  1646. // container. [2]
  1647. func ContainerCommandArgs(val ...string) attribute.KeyValue {
  1648. return ContainerCommandArgsKey.StringSlice(val)
  1649. }
  1650. // ContainerCommandLine returns an attribute KeyValue conforming to the
  1651. // "container.command_line" semantic conventions. It represents the full
  1652. // command run by the container as a single string representing the full
  1653. // command. [2]
  1654. func ContainerCommandLine(val string) attribute.KeyValue {
  1655. return ContainerCommandLineKey.String(val)
  1656. }
  1657. // ContainerID returns an attribute KeyValue conforming to the
  1658. // "container.id" semantic conventions. It represents the container ID. Usually
  1659. // a UUID, as for example used to [identify Docker
  1660. // containers](https://docs.docker.com/engine/reference/run/#container-identification).
  1661. // The UUID might be abbreviated.
  1662. func ContainerID(val string) attribute.KeyValue {
  1663. return ContainerIDKey.String(val)
  1664. }
  1665. // ContainerImageID returns an attribute KeyValue conforming to the
  1666. // "container.image.id" semantic conventions. It represents the runtime
  1667. // specific image identifier. Usually a hash algorithm followed by a UUID.
  1668. func ContainerImageID(val string) attribute.KeyValue {
  1669. return ContainerImageIDKey.String(val)
  1670. }
  1671. // ContainerImageName returns an attribute KeyValue conforming to the
  1672. // "container.image.name" semantic conventions. It represents the name of the
  1673. // image the container was built on.
  1674. func ContainerImageName(val string) attribute.KeyValue {
  1675. return ContainerImageNameKey.String(val)
  1676. }
  1677. // ContainerImageRepoDigests returns an attribute KeyValue conforming to the
  1678. // "container.image.repo_digests" semantic conventions. It represents the repo
  1679. // digests of the container image as provided by the container runtime.
  1680. func ContainerImageRepoDigests(val ...string) attribute.KeyValue {
  1681. return ContainerImageRepoDigestsKey.StringSlice(val)
  1682. }
  1683. // ContainerImageTags returns an attribute KeyValue conforming to the
  1684. // "container.image.tags" semantic conventions. It represents the container
  1685. // image tags. An example can be found in [Docker Image
  1686. // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect).
  1687. // Should be only the `<tag>` section of the full name for example from
  1688. // `registry.example.com/my-org/my-image:<tag>`.
  1689. func ContainerImageTags(val ...string) attribute.KeyValue {
  1690. return ContainerImageTagsKey.StringSlice(val)
  1691. }
  1692. // ContainerName returns an attribute KeyValue conforming to the
  1693. // "container.name" semantic conventions. It represents the container name used
  1694. // by container runtime.
  1695. func ContainerName(val string) attribute.KeyValue {
  1696. return ContainerNameKey.String(val)
  1697. }
  1698. // ContainerRuntime returns an attribute KeyValue conforming to the
  1699. // "container.runtime" semantic conventions. It represents the container
  1700. // runtime managing this container.
  1701. func ContainerRuntime(val string) attribute.KeyValue {
  1702. return ContainerRuntimeKey.String(val)
  1703. }
  1704. // This group defines the attributes used to describe telemetry in the context
  1705. // of databases.
  1706. const (
  1707. // DBClientConnectionsPoolNameKey is the attribute Key conforming to the
  1708. // "db.client.connections.pool.name" semantic conventions. It represents
  1709. // the name of the connection pool; unique within the instrumented
  1710. // application. In case the connection pool implementation doesn't provide
  1711. // a name, instrumentation should use a combination of `server.address` and
  1712. // `server.port` attributes formatted as `server.address:server.port`.
  1713. //
  1714. // Type: string
  1715. // RequirementLevel: Optional
  1716. // Stability: experimental
  1717. // Examples: 'myDataSource'
  1718. DBClientConnectionsPoolNameKey = attribute.Key("db.client.connections.pool.name")
  1719. // DBClientConnectionsStateKey is the attribute Key conforming to the
  1720. // "db.client.connections.state" semantic conventions. It represents the
  1721. // state of a connection in the pool
  1722. //
  1723. // Type: Enum
  1724. // RequirementLevel: Optional
  1725. // Stability: experimental
  1726. // Examples: 'idle'
  1727. DBClientConnectionsStateKey = attribute.Key("db.client.connections.state")
  1728. // DBCollectionNameKey is the attribute Key conforming to the
  1729. // "db.collection.name" semantic conventions. It represents the name of a
  1730. // collection (table, container) within the database.
  1731. //
  1732. // Type: string
  1733. // RequirementLevel: Optional
  1734. // Stability: experimental
  1735. // Examples: 'public.users', 'customers'
  1736. // Note: If the collection name is parsed from the query, it SHOULD match
  1737. // the value provided in the query and may be qualified with the schema and
  1738. // database name.
  1739. // It is RECOMMENDED to capture the value as provided by the application
  1740. // without attempting to do any case normalization.
  1741. DBCollectionNameKey = attribute.Key("db.collection.name")
  1742. // DBNamespaceKey is the attribute Key conforming to the "db.namespace"
  1743. // semantic conventions. It represents the name of the database, fully
  1744. // qualified within the server address and port.
  1745. //
  1746. // Type: string
  1747. // RequirementLevel: Optional
  1748. // Stability: experimental
  1749. // Examples: 'customers', 'test.users'
  1750. // Note: If a database system has multiple namespace components, they
  1751. // SHOULD be concatenated (potentially using database system specific
  1752. // conventions) from most general to most specific namespace component, and
  1753. // more specific namespaces SHOULD NOT be captured without the more general
  1754. // namespaces, to ensure that "startswith" queries for the more general
  1755. // namespaces will be valid.
  1756. // Semantic conventions for individual database systems SHOULD document
  1757. // what `db.namespace` means in the context of that system.
  1758. // It is RECOMMENDED to capture the value as provided by the application
  1759. // without attempting to do any case normalization.
  1760. DBNamespaceKey = attribute.Key("db.namespace")
  1761. // DBOperationNameKey is the attribute Key conforming to the
  1762. // "db.operation.name" semantic conventions. It represents the name of the
  1763. // operation or command being executed.
  1764. //
  1765. // Type: string
  1766. // RequirementLevel: Optional
  1767. // Stability: experimental
  1768. // Examples: 'findAndModify', 'HMSET', 'SELECT'
  1769. // Note: It is RECOMMENDED to capture the value as provided by the
  1770. // application without attempting to do any case normalization.
  1771. DBOperationNameKey = attribute.Key("db.operation.name")
  1772. // DBQueryTextKey is the attribute Key conforming to the "db.query.text"
  1773. // semantic conventions. It represents the database query being executed.
  1774. //
  1775. // Type: string
  1776. // RequirementLevel: Optional
  1777. // Stability: experimental
  1778. // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey
  1779. // "WuValue"'
  1780. DBQueryTextKey = attribute.Key("db.query.text")
  1781. // DBSystemKey is the attribute Key conforming to the "db.system" semantic
  1782. // conventions. It represents the database management system (DBMS) product
  1783. // as identified by the client instrumentation.
  1784. //
  1785. // Type: Enum
  1786. // RequirementLevel: Optional
  1787. // Stability: experimental
  1788. // Note: The actual DBMS may differ from the one identified by the client.
  1789. // For example, when using PostgreSQL client libraries to connect to a
  1790. // CockroachDB, the `db.system` is set to `postgresql` based on the
  1791. // instrumentation's best knowledge.
  1792. DBSystemKey = attribute.Key("db.system")
  1793. )
  1794. var (
  1795. // idle
  1796. DBClientConnectionsStateIdle = DBClientConnectionsStateKey.String("idle")
  1797. // used
  1798. DBClientConnectionsStateUsed = DBClientConnectionsStateKey.String("used")
  1799. )
  1800. var (
  1801. // Some other SQL database. Fallback only. See notes
  1802. DBSystemOtherSQL = DBSystemKey.String("other_sql")
  1803. // Microsoft SQL Server
  1804. DBSystemMSSQL = DBSystemKey.String("mssql")
  1805. // Microsoft SQL Server Compact
  1806. DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact")
  1807. // MySQL
  1808. DBSystemMySQL = DBSystemKey.String("mysql")
  1809. // Oracle Database
  1810. DBSystemOracle = DBSystemKey.String("oracle")
  1811. // IBM DB2
  1812. DBSystemDB2 = DBSystemKey.String("db2")
  1813. // PostgreSQL
  1814. DBSystemPostgreSQL = DBSystemKey.String("postgresql")
  1815. // Amazon Redshift
  1816. DBSystemRedshift = DBSystemKey.String("redshift")
  1817. // Apache Hive
  1818. DBSystemHive = DBSystemKey.String("hive")
  1819. // Cloudscape
  1820. DBSystemCloudscape = DBSystemKey.String("cloudscape")
  1821. // HyperSQL DataBase
  1822. DBSystemHSQLDB = DBSystemKey.String("hsqldb")
  1823. // Progress Database
  1824. DBSystemProgress = DBSystemKey.String("progress")
  1825. // SAP MaxDB
  1826. DBSystemMaxDB = DBSystemKey.String("maxdb")
  1827. // SAP HANA
  1828. DBSystemHanaDB = DBSystemKey.String("hanadb")
  1829. // Ingres
  1830. DBSystemIngres = DBSystemKey.String("ingres")
  1831. // FirstSQL
  1832. DBSystemFirstSQL = DBSystemKey.String("firstsql")
  1833. // EnterpriseDB
  1834. DBSystemEDB = DBSystemKey.String("edb")
  1835. // InterSystems Caché
  1836. DBSystemCache = DBSystemKey.String("cache")
  1837. // Adabas (Adaptable Database System)
  1838. DBSystemAdabas = DBSystemKey.String("adabas")
  1839. // Firebird
  1840. DBSystemFirebird = DBSystemKey.String("firebird")
  1841. // Apache Derby
  1842. DBSystemDerby = DBSystemKey.String("derby")
  1843. // FileMaker
  1844. DBSystemFilemaker = DBSystemKey.String("filemaker")
  1845. // Informix
  1846. DBSystemInformix = DBSystemKey.String("informix")
  1847. // InstantDB
  1848. DBSystemInstantDB = DBSystemKey.String("instantdb")
  1849. // InterBase
  1850. DBSystemInterbase = DBSystemKey.String("interbase")
  1851. // MariaDB
  1852. DBSystemMariaDB = DBSystemKey.String("mariadb")
  1853. // Netezza
  1854. DBSystemNetezza = DBSystemKey.String("netezza")
  1855. // Pervasive PSQL
  1856. DBSystemPervasive = DBSystemKey.String("pervasive")
  1857. // PointBase
  1858. DBSystemPointbase = DBSystemKey.String("pointbase")
  1859. // SQLite
  1860. DBSystemSqlite = DBSystemKey.String("sqlite")
  1861. // Sybase
  1862. DBSystemSybase = DBSystemKey.String("sybase")
  1863. // Teradata
  1864. DBSystemTeradata = DBSystemKey.String("teradata")
  1865. // Vertica
  1866. DBSystemVertica = DBSystemKey.String("vertica")
  1867. // H2
  1868. DBSystemH2 = DBSystemKey.String("h2")
  1869. // ColdFusion IMQ
  1870. DBSystemColdfusion = DBSystemKey.String("coldfusion")
  1871. // Apache Cassandra
  1872. DBSystemCassandra = DBSystemKey.String("cassandra")
  1873. // Apache HBase
  1874. DBSystemHBase = DBSystemKey.String("hbase")
  1875. // MongoDB
  1876. DBSystemMongoDB = DBSystemKey.String("mongodb")
  1877. // Redis
  1878. DBSystemRedis = DBSystemKey.String("redis")
  1879. // Couchbase
  1880. DBSystemCouchbase = DBSystemKey.String("couchbase")
  1881. // CouchDB
  1882. DBSystemCouchDB = DBSystemKey.String("couchdb")
  1883. // Microsoft Azure Cosmos DB
  1884. DBSystemCosmosDB = DBSystemKey.String("cosmosdb")
  1885. // Amazon DynamoDB
  1886. DBSystemDynamoDB = DBSystemKey.String("dynamodb")
  1887. // Neo4j
  1888. DBSystemNeo4j = DBSystemKey.String("neo4j")
  1889. // Apache Geode
  1890. DBSystemGeode = DBSystemKey.String("geode")
  1891. // Elasticsearch
  1892. DBSystemElasticsearch = DBSystemKey.String("elasticsearch")
  1893. // Memcached
  1894. DBSystemMemcached = DBSystemKey.String("memcached")
  1895. // CockroachDB
  1896. DBSystemCockroachdb = DBSystemKey.String("cockroachdb")
  1897. // OpenSearch
  1898. DBSystemOpensearch = DBSystemKey.String("opensearch")
  1899. // ClickHouse
  1900. DBSystemClickhouse = DBSystemKey.String("clickhouse")
  1901. // Cloud Spanner
  1902. DBSystemSpanner = DBSystemKey.String("spanner")
  1903. // Trino
  1904. DBSystemTrino = DBSystemKey.String("trino")
  1905. )
  1906. // DBClientConnectionsPoolName returns an attribute KeyValue conforming to
  1907. // the "db.client.connections.pool.name" semantic conventions. It represents
  1908. // the name of the connection pool; unique within the instrumented application.
  1909. // In case the connection pool implementation doesn't provide a name,
  1910. // instrumentation should use a combination of `server.address` and
  1911. // `server.port` attributes formatted as `server.address:server.port`.
  1912. func DBClientConnectionsPoolName(val string) attribute.KeyValue {
  1913. return DBClientConnectionsPoolNameKey.String(val)
  1914. }
  1915. // DBCollectionName returns an attribute KeyValue conforming to the
  1916. // "db.collection.name" semantic conventions. It represents the name of a
  1917. // collection (table, container) within the database.
  1918. func DBCollectionName(val string) attribute.KeyValue {
  1919. return DBCollectionNameKey.String(val)
  1920. }
  1921. // DBNamespace returns an attribute KeyValue conforming to the
  1922. // "db.namespace" semantic conventions. It represents the name of the database,
  1923. // fully qualified within the server address and port.
  1924. func DBNamespace(val string) attribute.KeyValue {
  1925. return DBNamespaceKey.String(val)
  1926. }
  1927. // DBOperationName returns an attribute KeyValue conforming to the
  1928. // "db.operation.name" semantic conventions. It represents the name of the
  1929. // operation or command being executed.
  1930. func DBOperationName(val string) attribute.KeyValue {
  1931. return DBOperationNameKey.String(val)
  1932. }
  1933. // DBQueryText returns an attribute KeyValue conforming to the
  1934. // "db.query.text" semantic conventions. It represents the database query being
  1935. // executed.
  1936. func DBQueryText(val string) attribute.KeyValue {
  1937. return DBQueryTextKey.String(val)
  1938. }
  1939. // This group defines attributes for Cassandra.
  1940. const (
  1941. // DBCassandraConsistencyLevelKey is the attribute Key conforming to the
  1942. // "db.cassandra.consistency_level" semantic conventions. It represents the
  1943. // consistency level of the query. Based on consistency values from
  1944. // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).
  1945. //
  1946. // Type: Enum
  1947. // RequirementLevel: Optional
  1948. // Stability: experimental
  1949. DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level")
  1950. // DBCassandraCoordinatorDCKey is the attribute Key conforming to the
  1951. // "db.cassandra.coordinator.dc" semantic conventions. It represents the
  1952. // data center of the coordinating node for a query.
  1953. //
  1954. // Type: string
  1955. // RequirementLevel: Optional
  1956. // Stability: experimental
  1957. // Examples: 'us-west-2'
  1958. DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc")
  1959. // DBCassandraCoordinatorIDKey is the attribute Key conforming to the
  1960. // "db.cassandra.coordinator.id" semantic conventions. It represents the ID
  1961. // of the coordinating node for a query.
  1962. //
  1963. // Type: string
  1964. // RequirementLevel: Optional
  1965. // Stability: experimental
  1966. // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af'
  1967. DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id")
  1968. // DBCassandraIdempotenceKey is the attribute Key conforming to the
  1969. // "db.cassandra.idempotence" semantic conventions. It represents the
  1970. // whether or not the query is idempotent.
  1971. //
  1972. // Type: boolean
  1973. // RequirementLevel: Optional
  1974. // Stability: experimental
  1975. DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence")
  1976. // DBCassandraPageSizeKey is the attribute Key conforming to the
  1977. // "db.cassandra.page_size" semantic conventions. It represents the fetch
  1978. // size used for paging, i.e. how many rows will be returned at once.
  1979. //
  1980. // Type: int
  1981. // RequirementLevel: Optional
  1982. // Stability: experimental
  1983. // Examples: 5000
  1984. DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size")
  1985. // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming
  1986. // to the "db.cassandra.speculative_execution_count" semantic conventions.
  1987. // It represents the number of times a query was speculatively executed.
  1988. // Not set or `0` if the query was not executed speculatively.
  1989. //
  1990. // Type: int
  1991. // RequirementLevel: Optional
  1992. // Stability: experimental
  1993. // Examples: 0, 2
  1994. DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count")
  1995. )
  1996. var (
  1997. // all
  1998. DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all")
  1999. // each_quorum
  2000. DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum")
  2001. // quorum
  2002. DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum")
  2003. // local_quorum
  2004. DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum")
  2005. // one
  2006. DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one")
  2007. // two
  2008. DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two")
  2009. // three
  2010. DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three")
  2011. // local_one
  2012. DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one")
  2013. // any
  2014. DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any")
  2015. // serial
  2016. DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial")
  2017. // local_serial
  2018. DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial")
  2019. )
  2020. // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the
  2021. // "db.cassandra.coordinator.dc" semantic conventions. It represents the data
  2022. // center of the coordinating node for a query.
  2023. func DBCassandraCoordinatorDC(val string) attribute.KeyValue {
  2024. return DBCassandraCoordinatorDCKey.String(val)
  2025. }
  2026. // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the
  2027. // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of
  2028. // the coordinating node for a query.
  2029. func DBCassandraCoordinatorID(val string) attribute.KeyValue {
  2030. return DBCassandraCoordinatorIDKey.String(val)
  2031. }
  2032. // DBCassandraIdempotence returns an attribute KeyValue conforming to the
  2033. // "db.cassandra.idempotence" semantic conventions. It represents the whether
  2034. // or not the query is idempotent.
  2035. func DBCassandraIdempotence(val bool) attribute.KeyValue {
  2036. return DBCassandraIdempotenceKey.Bool(val)
  2037. }
  2038. // DBCassandraPageSize returns an attribute KeyValue conforming to the
  2039. // "db.cassandra.page_size" semantic conventions. It represents the fetch size
  2040. // used for paging, i.e. how many rows will be returned at once.
  2041. func DBCassandraPageSize(val int) attribute.KeyValue {
  2042. return DBCassandraPageSizeKey.Int(val)
  2043. }
  2044. // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue
  2045. // conforming to the "db.cassandra.speculative_execution_count" semantic
  2046. // conventions. It represents the number of times a query was speculatively
  2047. // executed. Not set or `0` if the query was not executed speculatively.
  2048. func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue {
  2049. return DBCassandraSpeculativeExecutionCountKey.Int(val)
  2050. }
  2051. // This group defines attributes for Azure Cosmos DB.
  2052. const (
  2053. // DBCosmosDBClientIDKey is the attribute Key conforming to the
  2054. // "db.cosmosdb.client_id" semantic conventions. It represents the unique
  2055. // Cosmos client instance id.
  2056. //
  2057. // Type: string
  2058. // RequirementLevel: Optional
  2059. // Stability: experimental
  2060. // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d'
  2061. DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id")
  2062. // DBCosmosDBConnectionModeKey is the attribute Key conforming to the
  2063. // "db.cosmosdb.connection_mode" semantic conventions. It represents the
  2064. // cosmos client connection mode.
  2065. //
  2066. // Type: Enum
  2067. // RequirementLevel: Optional
  2068. // Stability: experimental
  2069. DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode")
  2070. // DBCosmosDBOperationTypeKey is the attribute Key conforming to the
  2071. // "db.cosmosdb.operation_type" semantic conventions. It represents the
  2072. // cosmosDB Operation Type.
  2073. //
  2074. // Type: Enum
  2075. // RequirementLevel: Optional
  2076. // Stability: experimental
  2077. DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type")
  2078. // DBCosmosDBRequestChargeKey is the attribute Key conforming to the
  2079. // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
  2080. // consumed for that operation
  2081. //
  2082. // Type: double
  2083. // RequirementLevel: Optional
  2084. // Stability: experimental
  2085. // Examples: 46.18, 1.0
  2086. DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge")
  2087. // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the
  2088. // "db.cosmosdb.request_content_length" semantic conventions. It represents
  2089. // the request payload size in bytes
  2090. //
  2091. // Type: int
  2092. // RequirementLevel: Optional
  2093. // Stability: experimental
  2094. DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length")
  2095. // DBCosmosDBStatusCodeKey is the attribute Key conforming to the
  2096. // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos
  2097. // DB status code.
  2098. //
  2099. // Type: int
  2100. // RequirementLevel: Optional
  2101. // Stability: experimental
  2102. // Examples: 200, 201
  2103. DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code")
  2104. // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the
  2105. // "db.cosmosdb.sub_status_code" semantic conventions. It represents the
  2106. // cosmos DB sub status code.
  2107. //
  2108. // Type: int
  2109. // RequirementLevel: Optional
  2110. // Stability: experimental
  2111. // Examples: 1000, 1002
  2112. DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code")
  2113. )
  2114. var (
  2115. // Gateway (HTTP) connections mode
  2116. DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway")
  2117. // Direct connection
  2118. DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct")
  2119. )
  2120. var (
  2121. // invalid
  2122. DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid")
  2123. // create
  2124. DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create")
  2125. // patch
  2126. DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch")
  2127. // read
  2128. DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read")
  2129. // read_feed
  2130. DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed")
  2131. // delete
  2132. DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete")
  2133. // replace
  2134. DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace")
  2135. // execute
  2136. DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute")
  2137. // query
  2138. DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query")
  2139. // head
  2140. DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head")
  2141. // head_feed
  2142. DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed")
  2143. // upsert
  2144. DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert")
  2145. // batch
  2146. DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch")
  2147. // query_plan
  2148. DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan")
  2149. // execute_javascript
  2150. DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript")
  2151. )
  2152. // DBCosmosDBClientID returns an attribute KeyValue conforming to the
  2153. // "db.cosmosdb.client_id" semantic conventions. It represents the unique
  2154. // Cosmos client instance id.
  2155. func DBCosmosDBClientID(val string) attribute.KeyValue {
  2156. return DBCosmosDBClientIDKey.String(val)
  2157. }
  2158. // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the
  2159. // "db.cosmosdb.request_charge" semantic conventions. It represents the rU
  2160. // consumed for that operation
  2161. func DBCosmosDBRequestCharge(val float64) attribute.KeyValue {
  2162. return DBCosmosDBRequestChargeKey.Float64(val)
  2163. }
  2164. // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming
  2165. // to the "db.cosmosdb.request_content_length" semantic conventions. It
  2166. // represents the request payload size in bytes
  2167. func DBCosmosDBRequestContentLength(val int) attribute.KeyValue {
  2168. return DBCosmosDBRequestContentLengthKey.Int(val)
  2169. }
  2170. // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the
  2171. // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB
  2172. // status code.
  2173. func DBCosmosDBStatusCode(val int) attribute.KeyValue {
  2174. return DBCosmosDBStatusCodeKey.Int(val)
  2175. }
  2176. // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the
  2177. // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos
  2178. // DB sub status code.
  2179. func DBCosmosDBSubStatusCode(val int) attribute.KeyValue {
  2180. return DBCosmosDBSubStatusCodeKey.Int(val)
  2181. }
  2182. // This group defines attributes for Elasticsearch.
  2183. const (
  2184. // DBElasticsearchClusterNameKey is the attribute Key conforming to the
  2185. // "db.elasticsearch.cluster.name" semantic conventions. It represents the
  2186. // represents the identifier of an Elasticsearch cluster.
  2187. //
  2188. // Type: string
  2189. // RequirementLevel: Optional
  2190. // Stability: experimental
  2191. // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f'
  2192. DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name")
  2193. // DBElasticsearchNodeNameKey is the attribute Key conforming to the
  2194. // "db.elasticsearch.node.name" semantic conventions. It represents the
  2195. // represents the human-readable identifier of the node/instance to which a
  2196. // request was routed.
  2197. //
  2198. // Type: string
  2199. // RequirementLevel: Optional
  2200. // Stability: experimental
  2201. // Examples: 'instance-0000000001'
  2202. DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name")
  2203. )
  2204. // DBElasticsearchClusterName returns an attribute KeyValue conforming to
  2205. // the "db.elasticsearch.cluster.name" semantic conventions. It represents the
  2206. // represents the identifier of an Elasticsearch cluster.
  2207. func DBElasticsearchClusterName(val string) attribute.KeyValue {
  2208. return DBElasticsearchClusterNameKey.String(val)
  2209. }
  2210. // DBElasticsearchNodeName returns an attribute KeyValue conforming to the
  2211. // "db.elasticsearch.node.name" semantic conventions. It represents the
  2212. // represents the human-readable identifier of the node/instance to which a
  2213. // request was routed.
  2214. func DBElasticsearchNodeName(val string) attribute.KeyValue {
  2215. return DBElasticsearchNodeNameKey.String(val)
  2216. }
  2217. // Attributes for software deployments.
  2218. const (
  2219. // DeploymentEnvironmentKey is the attribute Key conforming to the
  2220. // "deployment.environment" semantic conventions. It represents the name of
  2221. // the [deployment
  2222. // environment](https://wikipedia.org/wiki/Deployment_environment) (aka
  2223. // deployment tier).
  2224. //
  2225. // Type: string
  2226. // RequirementLevel: Optional
  2227. // Stability: experimental
  2228. // Examples: 'staging', 'production'
  2229. // Note: `deployment.environment` does not affect the uniqueness
  2230. // constraints defined through
  2231. // the `service.namespace`, `service.name` and `service.instance.id`
  2232. // resource attributes.
  2233. // This implies that resources carrying the following attribute
  2234. // combinations MUST be
  2235. // considered to be identifying the same service:
  2236. //
  2237. // * `service.name=frontend`, `deployment.environment=production`
  2238. // * `service.name=frontend`, `deployment.environment=staging`.
  2239. DeploymentEnvironmentKey = attribute.Key("deployment.environment")
  2240. )
  2241. // DeploymentEnvironment returns an attribute KeyValue conforming to the
  2242. // "deployment.environment" semantic conventions. It represents the name of the
  2243. // [deployment environment](https://wikipedia.org/wiki/Deployment_environment)
  2244. // (aka deployment tier).
  2245. func DeploymentEnvironment(val string) attribute.KeyValue {
  2246. return DeploymentEnvironmentKey.String(val)
  2247. }
  2248. // Attributes that represents an occurrence of a lifecycle transition on the
  2249. // Android platform.
  2250. const (
  2251. // AndroidStateKey is the attribute Key conforming to the "android.state"
  2252. // semantic conventions. It represents the deprecated use the
  2253. // `device.app.lifecycle` event definition including `android.state` as a
  2254. // payload field instead.
  2255. //
  2256. // Type: Enum
  2257. // RequirementLevel: Optional
  2258. // Stability: experimental
  2259. // Note: The Android lifecycle states are defined in [Activity lifecycle
  2260. // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc),
  2261. // and from which the `OS identifiers` are derived.
  2262. AndroidStateKey = attribute.Key("android.state")
  2263. )
  2264. var (
  2265. // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
  2266. AndroidStateCreated = AndroidStateKey.String("created")
  2267. // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
  2268. AndroidStateBackground = AndroidStateKey.String("background")
  2269. // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
  2270. AndroidStateForeground = AndroidStateKey.String("foreground")
  2271. )
  2272. // These attributes may be used to describe the receiver of a network
  2273. // exchange/packet. These should be used when there is no client/server
  2274. // relationship between the two sides, or when that relationship is unknown.
  2275. // This covers low-level network interactions (e.g. packet tracing) where you
  2276. // don't know if there was a connection or which side initiated it. This also
  2277. // covers unidirectional UDP flows and peer-to-peer communication where the
  2278. // "user-facing" surface of the protocol / API doesn't expose a clear notion of
  2279. // client and server.
  2280. const (
  2281. // DestinationAddressKey is the attribute Key conforming to the
  2282. // "destination.address" semantic conventions. It represents the
  2283. // destination address - domain name if available without reverse DNS
  2284. // lookup; otherwise, IP address or Unix domain socket name.
  2285. //
  2286. // Type: string
  2287. // RequirementLevel: Optional
  2288. // Stability: experimental
  2289. // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock'
  2290. // Note: When observed from the source side, and when communicating through
  2291. // an intermediary, `destination.address` SHOULD represent the destination
  2292. // address behind any intermediaries, for example proxies, if it's
  2293. // available.
  2294. DestinationAddressKey = attribute.Key("destination.address")
  2295. // DestinationPortKey is the attribute Key conforming to the
  2296. // "destination.port" semantic conventions. It represents the destination
  2297. // port number
  2298. //
  2299. // Type: int
  2300. // RequirementLevel: Optional
  2301. // Stability: experimental
  2302. // Examples: 3389, 2888
  2303. DestinationPortKey = attribute.Key("destination.port")
  2304. )
  2305. // DestinationAddress returns an attribute KeyValue conforming to the
  2306. // "destination.address" semantic conventions. It represents the destination
  2307. // address - domain name if available without reverse DNS lookup; otherwise, IP
  2308. // address or Unix domain socket name.
  2309. func DestinationAddress(val string) attribute.KeyValue {
  2310. return DestinationAddressKey.String(val)
  2311. }
  2312. // DestinationPort returns an attribute KeyValue conforming to the
  2313. // "destination.port" semantic conventions. It represents the destination port
  2314. // number
  2315. func DestinationPort(val int) attribute.KeyValue {
  2316. return DestinationPortKey.Int(val)
  2317. }
  2318. // Describes device attributes.
  2319. const (
  2320. // DeviceIDKey is the attribute Key conforming to the "device.id" semantic
  2321. // conventions. It represents a unique identifier representing the device
  2322. //
  2323. // Type: string
  2324. // RequirementLevel: Optional
  2325. // Stability: experimental
  2326. // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092'
  2327. // Note: The device identifier MUST only be defined using the values
  2328. // outlined below. This value is not an advertising identifier and MUST NOT
  2329. // be used as such. On iOS (Swift or Objective-C), this value MUST be equal
  2330. // to the [vendor
  2331. // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
  2332. // On Android (Java or Kotlin), this value MUST be equal to the Firebase
  2333. // Installation ID or a globally unique UUID which is persisted across
  2334. // sessions in your application. More information can be found
  2335. // [here](https://developer.android.com/training/articles/user-data-ids) on
  2336. // best practices and exact implementation details. Caution should be taken
  2337. // when storing personal data or anything which can identify a user. GDPR
  2338. // and data protection laws may apply, ensure you do your own due
  2339. // diligence.
  2340. DeviceIDKey = attribute.Key("device.id")
  2341. // DeviceManufacturerKey is the attribute Key conforming to the
  2342. // "device.manufacturer" semantic conventions. It represents the name of
  2343. // the device manufacturer
  2344. //
  2345. // Type: string
  2346. // RequirementLevel: Optional
  2347. // Stability: experimental
  2348. // Examples: 'Apple', 'Samsung'
  2349. // Note: The Android OS provides this field via
  2350. // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER).
  2351. // iOS apps SHOULD hardcode the value `Apple`.
  2352. DeviceManufacturerKey = attribute.Key("device.manufacturer")
  2353. // DeviceModelIdentifierKey is the attribute Key conforming to the
  2354. // "device.model.identifier" semantic conventions. It represents the model
  2355. // identifier for the device
  2356. //
  2357. // Type: string
  2358. // RequirementLevel: Optional
  2359. // Stability: experimental
  2360. // Examples: 'iPhone3,4', 'SM-G920F'
  2361. // Note: It's recommended this value represents a machine-readable version
  2362. // of the model identifier rather than the market or consumer-friendly name
  2363. // of the device.
  2364. DeviceModelIdentifierKey = attribute.Key("device.model.identifier")
  2365. // DeviceModelNameKey is the attribute Key conforming to the
  2366. // "device.model.name" semantic conventions. It represents the marketing
  2367. // name for the device model
  2368. //
  2369. // Type: string
  2370. // RequirementLevel: Optional
  2371. // Stability: experimental
  2372. // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6'
  2373. // Note: It's recommended this value represents a human-readable version of
  2374. // the device model rather than a machine-readable alternative.
  2375. DeviceModelNameKey = attribute.Key("device.model.name")
  2376. )
  2377. // DeviceID returns an attribute KeyValue conforming to the "device.id"
  2378. // semantic conventions. It represents a unique identifier representing the
  2379. // device
  2380. func DeviceID(val string) attribute.KeyValue {
  2381. return DeviceIDKey.String(val)
  2382. }
  2383. // DeviceManufacturer returns an attribute KeyValue conforming to the
  2384. // "device.manufacturer" semantic conventions. It represents the name of the
  2385. // device manufacturer
  2386. func DeviceManufacturer(val string) attribute.KeyValue {
  2387. return DeviceManufacturerKey.String(val)
  2388. }
  2389. // DeviceModelIdentifier returns an attribute KeyValue conforming to the
  2390. // "device.model.identifier" semantic conventions. It represents the model
  2391. // identifier for the device
  2392. func DeviceModelIdentifier(val string) attribute.KeyValue {
  2393. return DeviceModelIdentifierKey.String(val)
  2394. }
  2395. // DeviceModelName returns an attribute KeyValue conforming to the
  2396. // "device.model.name" semantic conventions. It represents the marketing name
  2397. // for the device model
  2398. func DeviceModelName(val string) attribute.KeyValue {
  2399. return DeviceModelNameKey.String(val)
  2400. }
  2401. // These attributes may be used for any disk related operation.
  2402. const (
  2403. // DiskIoDirectionKey is the attribute Key conforming to the
  2404. // "disk.io.direction" semantic conventions. It represents the disk IO
  2405. // operation direction.
  2406. //
  2407. // Type: Enum
  2408. // RequirementLevel: Optional
  2409. // Stability: experimental
  2410. // Examples: 'read'
  2411. DiskIoDirectionKey = attribute.Key("disk.io.direction")
  2412. )
  2413. var (
  2414. // read
  2415. DiskIoDirectionRead = DiskIoDirectionKey.String("read")
  2416. // write
  2417. DiskIoDirectionWrite = DiskIoDirectionKey.String("write")
  2418. )
  2419. // The shared attributes used to report a DNS query.
  2420. const (
  2421. // DNSQuestionNameKey is the attribute Key conforming to the
  2422. // "dns.question.name" semantic conventions. It represents the name being
  2423. // queried.
  2424. //
  2425. // Type: string
  2426. // RequirementLevel: Optional
  2427. // Stability: experimental
  2428. // Examples: 'www.example.com', 'opentelemetry.io'
  2429. // Note: If the name field contains non-printable characters (below 32 or
  2430. // above 126), those characters should be represented as escaped base 10
  2431. // integers (\DDD). Back slashes and quotes should be escaped. Tabs,
  2432. // carriage returns, and line feeds should be converted to \t, \r, and \n
  2433. // respectively.
  2434. DNSQuestionNameKey = attribute.Key("dns.question.name")
  2435. )
  2436. // DNSQuestionName returns an attribute KeyValue conforming to the
  2437. // "dns.question.name" semantic conventions. It represents the name being
  2438. // queried.
  2439. func DNSQuestionName(val string) attribute.KeyValue {
  2440. return DNSQuestionNameKey.String(val)
  2441. }
  2442. // Attributes for operations with an authenticated and/or authorized enduser.
  2443. const (
  2444. // EnduserIDKey is the attribute Key conforming to the "enduser.id"
  2445. // semantic conventions. It represents the username or client_id extracted
  2446. // from the access token or
  2447. // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header
  2448. // in the inbound request from outside the system.
  2449. //
  2450. // Type: string
  2451. // RequirementLevel: Optional
  2452. // Stability: experimental
  2453. // Examples: 'username'
  2454. EnduserIDKey = attribute.Key("enduser.id")
  2455. // EnduserRoleKey is the attribute Key conforming to the "enduser.role"
  2456. // semantic conventions. It represents the actual/assumed role the client
  2457. // is making the request under extracted from token or application security
  2458. // context.
  2459. //
  2460. // Type: string
  2461. // RequirementLevel: Optional
  2462. // Stability: experimental
  2463. // Examples: 'admin'
  2464. EnduserRoleKey = attribute.Key("enduser.role")
  2465. // EnduserScopeKey is the attribute Key conforming to the "enduser.scope"
  2466. // semantic conventions. It represents the scopes or granted authorities
  2467. // the client currently possesses extracted from token or application
  2468. // security context. The value would come from the scope associated with an
  2469. // [OAuth 2.0 Access
  2470. // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
  2471. // value in a [SAML 2.0
  2472. // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
  2473. //
  2474. // Type: string
  2475. // RequirementLevel: Optional
  2476. // Stability: experimental
  2477. // Examples: 'read:message, write:files'
  2478. EnduserScopeKey = attribute.Key("enduser.scope")
  2479. )
  2480. // EnduserID returns an attribute KeyValue conforming to the "enduser.id"
  2481. // semantic conventions. It represents the username or client_id extracted from
  2482. // the access token or
  2483. // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in
  2484. // the inbound request from outside the system.
  2485. func EnduserID(val string) attribute.KeyValue {
  2486. return EnduserIDKey.String(val)
  2487. }
  2488. // EnduserRole returns an attribute KeyValue conforming to the
  2489. // "enduser.role" semantic conventions. It represents the actual/assumed role
  2490. // the client is making the request under extracted from token or application
  2491. // security context.
  2492. func EnduserRole(val string) attribute.KeyValue {
  2493. return EnduserRoleKey.String(val)
  2494. }
  2495. // EnduserScope returns an attribute KeyValue conforming to the
  2496. // "enduser.scope" semantic conventions. It represents the scopes or granted
  2497. // authorities the client currently possesses extracted from token or
  2498. // application security context. The value would come from the scope associated
  2499. // with an [OAuth 2.0 Access
  2500. // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute
  2501. // value in a [SAML 2.0
  2502. // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
  2503. func EnduserScope(val string) attribute.KeyValue {
  2504. return EnduserScopeKey.String(val)
  2505. }
  2506. // The shared attributes used to report an error.
  2507. const (
  2508. // ErrorTypeKey is the attribute Key conforming to the "error.type"
  2509. // semantic conventions. It represents the describes a class of error the
  2510. // operation ended with.
  2511. //
  2512. // Type: Enum
  2513. // RequirementLevel: Optional
  2514. // Stability: stable
  2515. // Examples: 'timeout', 'java.net.UnknownHostException',
  2516. // 'server_certificate_invalid', '500'
  2517. // Note: The `error.type` SHOULD be predictable, and SHOULD have low
  2518. // cardinality.
  2519. //
  2520. // When `error.type` is set to a type (e.g., an exception type), its
  2521. // canonical class name identifying the type within the artifact SHOULD be
  2522. // used.
  2523. //
  2524. // Instrumentations SHOULD document the list of errors they report.
  2525. //
  2526. // The cardinality of `error.type` within one instrumentation library
  2527. // SHOULD be low.
  2528. // Telemetry consumers that aggregate data from multiple instrumentation
  2529. // libraries and applications
  2530. // should be prepared for `error.type` to have high cardinality at query
  2531. // time when no
  2532. // additional filters are applied.
  2533. //
  2534. // If the operation has completed successfully, instrumentations SHOULD NOT
  2535. // set `error.type`.
  2536. //
  2537. // If a specific domain defines its own set of error identifiers (such as
  2538. // HTTP or gRPC status codes),
  2539. // it's RECOMMENDED to:
  2540. //
  2541. // * Use a domain-specific attribute
  2542. // * Set `error.type` to capture all errors, regardless of whether they are
  2543. // defined within the domain-specific set or not.
  2544. ErrorTypeKey = attribute.Key("error.type")
  2545. )
  2546. var (
  2547. // A fallback error value to be used when the instrumentation doesn't define a custom value
  2548. ErrorTypeOther = ErrorTypeKey.String("_OTHER")
  2549. )
  2550. // Attributes for Events represented using Log Records.
  2551. const (
  2552. // EventNameKey is the attribute Key conforming to the "event.name"
  2553. // semantic conventions. It represents the identifies the class / type of
  2554. // event.
  2555. //
  2556. // Type: string
  2557. // RequirementLevel: Optional
  2558. // Stability: experimental
  2559. // Examples: 'browser.mouse.click', 'device.app.lifecycle'
  2560. // Note: Event names are subject to the same rules as [attribute
  2561. // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md).
  2562. // Notably, event names are namespaced to avoid collisions and provide a
  2563. // clean separation of semantics for events in separate domains like
  2564. // browser, mobile, and kubernetes.
  2565. EventNameKey = attribute.Key("event.name")
  2566. )
  2567. // EventName returns an attribute KeyValue conforming to the "event.name"
  2568. // semantic conventions. It represents the identifies the class / type of
  2569. // event.
  2570. func EventName(val string) attribute.KeyValue {
  2571. return EventNameKey.String(val)
  2572. }
  2573. // The shared attributes used to report a single exception associated with a
  2574. // span or log.
  2575. const (
  2576. // ExceptionEscapedKey is the attribute Key conforming to the
  2577. // "exception.escaped" semantic conventions. It represents the sHOULD be
  2578. // set to true if the exception event is recorded at a point where it is
  2579. // known that the exception is escaping the scope of the span.
  2580. //
  2581. // Type: boolean
  2582. // RequirementLevel: Optional
  2583. // Stability: stable
  2584. // Note: An exception is considered to have escaped (or left) the scope of
  2585. // a span,
  2586. // if that span is ended while the exception is still logically "in
  2587. // flight".
  2588. // This may be actually "in flight" in some languages (e.g. if the
  2589. // exception
  2590. // is passed to a Context manager's `__exit__` method in Python) but will
  2591. // usually be caught at the point of recording the exception in most
  2592. // languages.
  2593. //
  2594. // It is usually not possible to determine at the point where an exception
  2595. // is thrown
  2596. // whether it will escape the scope of a span.
  2597. // However, it is trivial to know that an exception
  2598. // will escape, if one checks for an active exception just before ending
  2599. // the span,
  2600. // as done in the [example for recording span
  2601. // exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception).
  2602. //
  2603. // It follows that an exception may still escape the scope of the span
  2604. // even if the `exception.escaped` attribute was not set or set to false,
  2605. // since the event might have been recorded at a time where it was not
  2606. // clear whether the exception will escape.
  2607. ExceptionEscapedKey = attribute.Key("exception.escaped")
  2608. // ExceptionMessageKey is the attribute Key conforming to the
  2609. // "exception.message" semantic conventions. It represents the exception
  2610. // message.
  2611. //
  2612. // Type: string
  2613. // RequirementLevel: Optional
  2614. // Stability: stable
  2615. // Examples: 'Division by zero', "Can't convert 'int' object to str
  2616. // implicitly"
  2617. ExceptionMessageKey = attribute.Key("exception.message")
  2618. // ExceptionStacktraceKey is the attribute Key conforming to the
  2619. // "exception.stacktrace" semantic conventions. It represents a stacktrace
  2620. // as a string in the natural representation for the language runtime. The
  2621. // representation is to be determined and documented by each language SIG.
  2622. //
  2623. // Type: string
  2624. // RequirementLevel: Optional
  2625. // Stability: stable
  2626. // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test
  2627. // exception\\n at '
  2628. // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at '
  2629. // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at '
  2630. // 'com.example.GenerateTrace.main(GenerateTrace.java:5)'
  2631. ExceptionStacktraceKey = attribute.Key("exception.stacktrace")
  2632. // ExceptionTypeKey is the attribute Key conforming to the "exception.type"
  2633. // semantic conventions. It represents the type of the exception (its
  2634. // fully-qualified class name, if applicable). The dynamic type of the
  2635. // exception should be preferred over the static type in languages that
  2636. // support it.
  2637. //
  2638. // Type: string
  2639. // RequirementLevel: Optional
  2640. // Stability: stable
  2641. // Examples: 'java.net.ConnectException', 'OSError'
  2642. ExceptionTypeKey = attribute.Key("exception.type")
  2643. )
  2644. // ExceptionEscaped returns an attribute KeyValue conforming to the
  2645. // "exception.escaped" semantic conventions. It represents the sHOULD be set to
  2646. // true if the exception event is recorded at a point where it is known that
  2647. // the exception is escaping the scope of the span.
  2648. func ExceptionEscaped(val bool) attribute.KeyValue {
  2649. return ExceptionEscapedKey.Bool(val)
  2650. }
  2651. // ExceptionMessage returns an attribute KeyValue conforming to the
  2652. // "exception.message" semantic conventions. It represents the exception
  2653. // message.
  2654. func ExceptionMessage(val string) attribute.KeyValue {
  2655. return ExceptionMessageKey.String(val)
  2656. }
  2657. // ExceptionStacktrace returns an attribute KeyValue conforming to the
  2658. // "exception.stacktrace" semantic conventions. It represents a stacktrace as a
  2659. // string in the natural representation for the language runtime. The
  2660. // representation is to be determined and documented by each language SIG.
  2661. func ExceptionStacktrace(val string) attribute.KeyValue {
  2662. return ExceptionStacktraceKey.String(val)
  2663. }
  2664. // ExceptionType returns an attribute KeyValue conforming to the
  2665. // "exception.type" semantic conventions. It represents the type of the
  2666. // exception (its fully-qualified class name, if applicable). The dynamic type
  2667. // of the exception should be preferred over the static type in languages that
  2668. // support it.
  2669. func ExceptionType(val string) attribute.KeyValue {
  2670. return ExceptionTypeKey.String(val)
  2671. }
  2672. // FaaS attributes
  2673. const (
  2674. // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart"
  2675. // semantic conventions. It represents a boolean that is true if the
  2676. // serverless function is executed for the first time (aka cold-start).
  2677. //
  2678. // Type: boolean
  2679. // RequirementLevel: Optional
  2680. // Stability: experimental
  2681. FaaSColdstartKey = attribute.Key("faas.coldstart")
  2682. // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic
  2683. // conventions. It represents a string containing the schedule period as
  2684. // [Cron
  2685. // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
  2686. //
  2687. // Type: string
  2688. // RequirementLevel: Optional
  2689. // Stability: experimental
  2690. // Examples: '0/5 * * * ? *'
  2691. FaaSCronKey = attribute.Key("faas.cron")
  2692. // FaaSDocumentCollectionKey is the attribute Key conforming to the
  2693. // "faas.document.collection" semantic conventions. It represents the name
  2694. // of the source on which the triggering operation was performed. For
  2695. // example, in Cloud Storage or S3 corresponds to the bucket name, and in
  2696. // Cosmos DB to the database name.
  2697. //
  2698. // Type: string
  2699. // RequirementLevel: Optional
  2700. // Stability: experimental
  2701. // Examples: 'myBucketName', 'myDBName'
  2702. FaaSDocumentCollectionKey = attribute.Key("faas.document.collection")
  2703. // FaaSDocumentNameKey is the attribute Key conforming to the
  2704. // "faas.document.name" semantic conventions. It represents the document
  2705. // name/table subjected to the operation. For example, in Cloud Storage or
  2706. // S3 is the name of the file, and in Cosmos DB the table name.
  2707. //
  2708. // Type: string
  2709. // RequirementLevel: Optional
  2710. // Stability: experimental
  2711. // Examples: 'myFile.txt', 'myTableName'
  2712. FaaSDocumentNameKey = attribute.Key("faas.document.name")
  2713. // FaaSDocumentOperationKey is the attribute Key conforming to the
  2714. // "faas.document.operation" semantic conventions. It represents the
  2715. // describes the type of the operation that was performed on the data.
  2716. //
  2717. // Type: Enum
  2718. // RequirementLevel: Optional
  2719. // Stability: experimental
  2720. FaaSDocumentOperationKey = attribute.Key("faas.document.operation")
  2721. // FaaSDocumentTimeKey is the attribute Key conforming to the
  2722. // "faas.document.time" semantic conventions. It represents a string
  2723. // containing the time when the data was accessed in the [ISO
  2724. // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
  2725. // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
  2726. //
  2727. // Type: string
  2728. // RequirementLevel: Optional
  2729. // Stability: experimental
  2730. // Examples: '2020-01-23T13:47:06Z'
  2731. FaaSDocumentTimeKey = attribute.Key("faas.document.time")
  2732. // FaaSInstanceKey is the attribute Key conforming to the "faas.instance"
  2733. // semantic conventions. It represents the execution environment ID as a
  2734. // string, that will be potentially reused for other invocations to the
  2735. // same function/function version.
  2736. //
  2737. // Type: string
  2738. // RequirementLevel: Optional
  2739. // Stability: experimental
  2740. // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de'
  2741. // Note: * **AWS Lambda:** Use the (full) log stream name.
  2742. FaaSInstanceKey = attribute.Key("faas.instance")
  2743. // FaaSInvocationIDKey is the attribute Key conforming to the
  2744. // "faas.invocation_id" semantic conventions. It represents the invocation
  2745. // ID of the current function invocation.
  2746. //
  2747. // Type: string
  2748. // RequirementLevel: Optional
  2749. // Stability: experimental
  2750. // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28'
  2751. FaaSInvocationIDKey = attribute.Key("faas.invocation_id")
  2752. // FaaSInvokedNameKey is the attribute Key conforming to the
  2753. // "faas.invoked_name" semantic conventions. It represents the name of the
  2754. // invoked function.
  2755. //
  2756. // Type: string
  2757. // RequirementLevel: Optional
  2758. // Stability: experimental
  2759. // Examples: 'my-function'
  2760. // Note: SHOULD be equal to the `faas.name` resource attribute of the
  2761. // invoked function.
  2762. FaaSInvokedNameKey = attribute.Key("faas.invoked_name")
  2763. // FaaSInvokedProviderKey is the attribute Key conforming to the
  2764. // "faas.invoked_provider" semantic conventions. It represents the cloud
  2765. // provider of the invoked function.
  2766. //
  2767. // Type: Enum
  2768. // RequirementLevel: Optional
  2769. // Stability: experimental
  2770. // Note: SHOULD be equal to the `cloud.provider` resource attribute of the
  2771. // invoked function.
  2772. FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider")
  2773. // FaaSInvokedRegionKey is the attribute Key conforming to the
  2774. // "faas.invoked_region" semantic conventions. It represents the cloud
  2775. // region of the invoked function.
  2776. //
  2777. // Type: string
  2778. // RequirementLevel: Optional
  2779. // Stability: experimental
  2780. // Examples: 'eu-central-1'
  2781. // Note: SHOULD be equal to the `cloud.region` resource attribute of the
  2782. // invoked function.
  2783. FaaSInvokedRegionKey = attribute.Key("faas.invoked_region")
  2784. // FaaSMaxMemoryKey is the attribute Key conforming to the
  2785. // "faas.max_memory" semantic conventions. It represents the amount of
  2786. // memory available to the serverless function converted to Bytes.
  2787. //
  2788. // Type: int
  2789. // RequirementLevel: Optional
  2790. // Stability: experimental
  2791. // Examples: 134217728
  2792. // Note: It's recommended to set this attribute since e.g. too little
  2793. // memory can easily stop a Java AWS Lambda function from working
  2794. // correctly. On AWS Lambda, the environment variable
  2795. // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must
  2796. // be multiplied by 1,048,576).
  2797. FaaSMaxMemoryKey = attribute.Key("faas.max_memory")
  2798. // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic
  2799. // conventions. It represents the name of the single function that this
  2800. // runtime instance executes.
  2801. //
  2802. // Type: string
  2803. // RequirementLevel: Optional
  2804. // Stability: experimental
  2805. // Examples: 'my-function', 'myazurefunctionapp/some-function-name'
  2806. // Note: This is the name of the function as configured/deployed on the
  2807. // FaaS
  2808. // platform and is usually different from the name of the callback
  2809. // function (which may be stored in the
  2810. // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes)
  2811. // span attributes).
  2812. //
  2813. // For some cloud providers, the above definition is ambiguous. The
  2814. // following
  2815. // definition of function name MUST be used for this attribute
  2816. // (and consequently the span name) for the listed cloud
  2817. // providers/products:
  2818. //
  2819. // * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name
  2820. // followed by a forward slash followed by the function name (this form
  2821. // can also be seen in the resource JSON for the function).
  2822. // This means that a span attribute MUST be used, as an Azure function
  2823. // app can host multiple functions that would usually share
  2824. // a TracerProvider (see also the `cloud.resource_id` attribute).
  2825. FaaSNameKey = attribute.Key("faas.name")
  2826. // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic
  2827. // conventions. It represents a string containing the function invocation
  2828. // time in the [ISO
  2829. // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
  2830. // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
  2831. //
  2832. // Type: string
  2833. // RequirementLevel: Optional
  2834. // Stability: experimental
  2835. // Examples: '2020-01-23T13:47:06Z'
  2836. FaaSTimeKey = attribute.Key("faas.time")
  2837. // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger"
  2838. // semantic conventions. It represents the type of the trigger which caused
  2839. // this function invocation.
  2840. //
  2841. // Type: Enum
  2842. // RequirementLevel: Optional
  2843. // Stability: experimental
  2844. FaaSTriggerKey = attribute.Key("faas.trigger")
  2845. // FaaSVersionKey is the attribute Key conforming to the "faas.version"
  2846. // semantic conventions. It represents the immutable version of the
  2847. // function being executed.
  2848. //
  2849. // Type: string
  2850. // RequirementLevel: Optional
  2851. // Stability: experimental
  2852. // Examples: '26', 'pinkfroid-00002'
  2853. // Note: Depending on the cloud provider and platform, use:
  2854. //
  2855. // * **AWS Lambda:** The [function
  2856. // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)
  2857. // (an integer represented as a decimal string).
  2858. // * **Google Cloud Run (Services):** The
  2859. // [revision](https://cloud.google.com/run/docs/managing/revisions)
  2860. // (i.e., the function name plus the revision suffix).
  2861. // * **Google Cloud Functions:** The value of the
  2862. // [`K_REVISION` environment
  2863. // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).
  2864. // * **Azure Functions:** Not applicable. Do not set this attribute.
  2865. FaaSVersionKey = attribute.Key("faas.version")
  2866. )
  2867. var (
  2868. // When a new object is created
  2869. FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
  2870. // When an object is modified
  2871. FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
  2872. // When an object is deleted
  2873. FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
  2874. )
  2875. var (
  2876. // Alibaba Cloud
  2877. FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud")
  2878. // Amazon Web Services
  2879. FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws")
  2880. // Microsoft Azure
  2881. FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure")
  2882. // Google Cloud Platform
  2883. FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp")
  2884. // Tencent Cloud
  2885. FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud")
  2886. )
  2887. var (
  2888. // A response to some data source operation such as a database or filesystem read/write
  2889. FaaSTriggerDatasource = FaaSTriggerKey.String("datasource")
  2890. // To provide an answer to an inbound HTTP request
  2891. FaaSTriggerHTTP = FaaSTriggerKey.String("http")
  2892. // A function is set to be executed when messages are sent to a messaging system
  2893. FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub")
  2894. // A function is scheduled to be executed regularly
  2895. FaaSTriggerTimer = FaaSTriggerKey.String("timer")
  2896. // If none of the others apply
  2897. FaaSTriggerOther = FaaSTriggerKey.String("other")
  2898. )
  2899. // FaaSColdstart returns an attribute KeyValue conforming to the
  2900. // "faas.coldstart" semantic conventions. It represents a boolean that is true
  2901. // if the serverless function is executed for the first time (aka cold-start).
  2902. func FaaSColdstart(val bool) attribute.KeyValue {
  2903. return FaaSColdstartKey.Bool(val)
  2904. }
  2905. // FaaSCron returns an attribute KeyValue conforming to the "faas.cron"
  2906. // semantic conventions. It represents a string containing the schedule period
  2907. // as [Cron
  2908. // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).
  2909. func FaaSCron(val string) attribute.KeyValue {
  2910. return FaaSCronKey.String(val)
  2911. }
  2912. // FaaSDocumentCollection returns an attribute KeyValue conforming to the
  2913. // "faas.document.collection" semantic conventions. It represents the name of
  2914. // the source on which the triggering operation was performed. For example, in
  2915. // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the
  2916. // database name.
  2917. func FaaSDocumentCollection(val string) attribute.KeyValue {
  2918. return FaaSDocumentCollectionKey.String(val)
  2919. }
  2920. // FaaSDocumentName returns an attribute KeyValue conforming to the
  2921. // "faas.document.name" semantic conventions. It represents the document
  2922. // name/table subjected to the operation. For example, in Cloud Storage or S3
  2923. // is the name of the file, and in Cosmos DB the table name.
  2924. func FaaSDocumentName(val string) attribute.KeyValue {
  2925. return FaaSDocumentNameKey.String(val)
  2926. }
  2927. // FaaSDocumentTime returns an attribute KeyValue conforming to the
  2928. // "faas.document.time" semantic conventions. It represents a string containing
  2929. // the time when the data was accessed in the [ISO
  2930. // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
  2931. // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
  2932. func FaaSDocumentTime(val string) attribute.KeyValue {
  2933. return FaaSDocumentTimeKey.String(val)
  2934. }
  2935. // FaaSInstance returns an attribute KeyValue conforming to the
  2936. // "faas.instance" semantic conventions. It represents the execution
  2937. // environment ID as a string, that will be potentially reused for other
  2938. // invocations to the same function/function version.
  2939. func FaaSInstance(val string) attribute.KeyValue {
  2940. return FaaSInstanceKey.String(val)
  2941. }
  2942. // FaaSInvocationID returns an attribute KeyValue conforming to the
  2943. // "faas.invocation_id" semantic conventions. It represents the invocation ID
  2944. // of the current function invocation.
  2945. func FaaSInvocationID(val string) attribute.KeyValue {
  2946. return FaaSInvocationIDKey.String(val)
  2947. }
  2948. // FaaSInvokedName returns an attribute KeyValue conforming to the
  2949. // "faas.invoked_name" semantic conventions. It represents the name of the
  2950. // invoked function.
  2951. func FaaSInvokedName(val string) attribute.KeyValue {
  2952. return FaaSInvokedNameKey.String(val)
  2953. }
  2954. // FaaSInvokedRegion returns an attribute KeyValue conforming to the
  2955. // "faas.invoked_region" semantic conventions. It represents the cloud region
  2956. // of the invoked function.
  2957. func FaaSInvokedRegion(val string) attribute.KeyValue {
  2958. return FaaSInvokedRegionKey.String(val)
  2959. }
  2960. // FaaSMaxMemory returns an attribute KeyValue conforming to the
  2961. // "faas.max_memory" semantic conventions. It represents the amount of memory
  2962. // available to the serverless function converted to Bytes.
  2963. func FaaSMaxMemory(val int) attribute.KeyValue {
  2964. return FaaSMaxMemoryKey.Int(val)
  2965. }
  2966. // FaaSName returns an attribute KeyValue conforming to the "faas.name"
  2967. // semantic conventions. It represents the name of the single function that
  2968. // this runtime instance executes.
  2969. func FaaSName(val string) attribute.KeyValue {
  2970. return FaaSNameKey.String(val)
  2971. }
  2972. // FaaSTime returns an attribute KeyValue conforming to the "faas.time"
  2973. // semantic conventions. It represents a string containing the function
  2974. // invocation time in the [ISO
  2975. // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format
  2976. // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).
  2977. func FaaSTime(val string) attribute.KeyValue {
  2978. return FaaSTimeKey.String(val)
  2979. }
  2980. // FaaSVersion returns an attribute KeyValue conforming to the
  2981. // "faas.version" semantic conventions. It represents the immutable version of
  2982. // the function being executed.
  2983. func FaaSVersion(val string) attribute.KeyValue {
  2984. return FaaSVersionKey.String(val)
  2985. }
  2986. // Attributes for Feature Flags.
  2987. const (
  2988. // FeatureFlagKeyKey is the attribute Key conforming to the
  2989. // "feature_flag.key" semantic conventions. It represents the unique
  2990. // identifier of the feature flag.
  2991. //
  2992. // Type: string
  2993. // RequirementLevel: Optional
  2994. // Stability: experimental
  2995. // Examples: 'logo-color'
  2996. FeatureFlagKeyKey = attribute.Key("feature_flag.key")
  2997. // FeatureFlagProviderNameKey is the attribute Key conforming to the
  2998. // "feature_flag.provider_name" semantic conventions. It represents the
  2999. // name of the service provider that performs the flag evaluation.
  3000. //
  3001. // Type: string
  3002. // RequirementLevel: Optional
  3003. // Stability: experimental
  3004. // Examples: 'Flag Manager'
  3005. FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name")
  3006. // FeatureFlagVariantKey is the attribute Key conforming to the
  3007. // "feature_flag.variant" semantic conventions. It represents the sHOULD be
  3008. // a semantic identifier for a value. If one is unavailable, a stringified
  3009. // version of the value can be used.
  3010. //
  3011. // Type: string
  3012. // RequirementLevel: Optional
  3013. // Stability: experimental
  3014. // Examples: 'red', 'true', 'on'
  3015. // Note: A semantic identifier, commonly referred to as a variant, provides
  3016. // a means
  3017. // for referring to a value without including the value itself. This can
  3018. // provide additional context for understanding the meaning behind a value.
  3019. // For example, the variant `red` maybe be used for the value `#c05543`.
  3020. //
  3021. // A stringified version of the value can be used in situations where a
  3022. // semantic identifier is unavailable. String representation of the value
  3023. // should be determined by the implementer.
  3024. FeatureFlagVariantKey = attribute.Key("feature_flag.variant")
  3025. )
  3026. // FeatureFlagKey returns an attribute KeyValue conforming to the
  3027. // "feature_flag.key" semantic conventions. It represents the unique identifier
  3028. // of the feature flag.
  3029. func FeatureFlagKey(val string) attribute.KeyValue {
  3030. return FeatureFlagKeyKey.String(val)
  3031. }
  3032. // FeatureFlagProviderName returns an attribute KeyValue conforming to the
  3033. // "feature_flag.provider_name" semantic conventions. It represents the name of
  3034. // the service provider that performs the flag evaluation.
  3035. func FeatureFlagProviderName(val string) attribute.KeyValue {
  3036. return FeatureFlagProviderNameKey.String(val)
  3037. }
  3038. // FeatureFlagVariant returns an attribute KeyValue conforming to the
  3039. // "feature_flag.variant" semantic conventions. It represents the sHOULD be a
  3040. // semantic identifier for a value. If one is unavailable, a stringified
  3041. // version of the value can be used.
  3042. func FeatureFlagVariant(val string) attribute.KeyValue {
  3043. return FeatureFlagVariantKey.String(val)
  3044. }
  3045. // Describes file attributes.
  3046. const (
  3047. // FileDirectoryKey is the attribute Key conforming to the "file.directory"
  3048. // semantic conventions. It represents the directory where the file is
  3049. // located. It should include the drive letter, when appropriate.
  3050. //
  3051. // Type: string
  3052. // RequirementLevel: Optional
  3053. // Stability: experimental
  3054. // Examples: '/home/user', 'C:\\Program Files\\MyApp'
  3055. FileDirectoryKey = attribute.Key("file.directory")
  3056. // FileExtensionKey is the attribute Key conforming to the "file.extension"
  3057. // semantic conventions. It represents the file extension, excluding the
  3058. // leading dot.
  3059. //
  3060. // Type: string
  3061. // RequirementLevel: Optional
  3062. // Stability: experimental
  3063. // Examples: 'png', 'gz'
  3064. // Note: When the file name has multiple extensions (example.tar.gz), only
  3065. // the last one should be captured ("gz", not "tar.gz").
  3066. FileExtensionKey = attribute.Key("file.extension")
  3067. // FileNameKey is the attribute Key conforming to the "file.name" semantic
  3068. // conventions. It represents the name of the file including the extension,
  3069. // without the directory.
  3070. //
  3071. // Type: string
  3072. // RequirementLevel: Optional
  3073. // Stability: experimental
  3074. // Examples: 'example.png'
  3075. FileNameKey = attribute.Key("file.name")
  3076. // FilePathKey is the attribute Key conforming to the "file.path" semantic
  3077. // conventions. It represents the full path to the file, including the file
  3078. // name. It should include the drive letter, when appropriate.
  3079. //
  3080. // Type: string
  3081. // RequirementLevel: Optional
  3082. // Stability: experimental
  3083. // Examples: '/home/alice/example.png', 'C:\\Program
  3084. // Files\\MyApp\\myapp.exe'
  3085. FilePathKey = attribute.Key("file.path")
  3086. // FileSizeKey is the attribute Key conforming to the "file.size" semantic
  3087. // conventions. It represents the file size in bytes.
  3088. //
  3089. // Type: int
  3090. // RequirementLevel: Optional
  3091. // Stability: experimental
  3092. FileSizeKey = attribute.Key("file.size")
  3093. )
  3094. // FileDirectory returns an attribute KeyValue conforming to the
  3095. // "file.directory" semantic conventions. It represents the directory where the
  3096. // file is located. It should include the drive letter, when appropriate.
  3097. func FileDirectory(val string) attribute.KeyValue {
  3098. return FileDirectoryKey.String(val)
  3099. }
  3100. // FileExtension returns an attribute KeyValue conforming to the
  3101. // "file.extension" semantic conventions. It represents the file extension,
  3102. // excluding the leading dot.
  3103. func FileExtension(val string) attribute.KeyValue {
  3104. return FileExtensionKey.String(val)
  3105. }
  3106. // FileName returns an attribute KeyValue conforming to the "file.name"
  3107. // semantic conventions. It represents the name of the file including the
  3108. // extension, without the directory.
  3109. func FileName(val string) attribute.KeyValue {
  3110. return FileNameKey.String(val)
  3111. }
  3112. // FilePath returns an attribute KeyValue conforming to the "file.path"
  3113. // semantic conventions. It represents the full path to the file, including the
  3114. // file name. It should include the drive letter, when appropriate.
  3115. func FilePath(val string) attribute.KeyValue {
  3116. return FilePathKey.String(val)
  3117. }
  3118. // FileSize returns an attribute KeyValue conforming to the "file.size"
  3119. // semantic conventions. It represents the file size in bytes.
  3120. func FileSize(val int) attribute.KeyValue {
  3121. return FileSizeKey.Int(val)
  3122. }
  3123. // Attributes for Google Cloud Run.
  3124. const (
  3125. // GCPCloudRunJobExecutionKey is the attribute Key conforming to the
  3126. // "gcp.cloud_run.job.execution" semantic conventions. It represents the
  3127. // name of the Cloud Run
  3128. // [execution](https://cloud.google.com/run/docs/managing/job-executions)
  3129. // being run for the Job, as set by the
  3130. // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  3131. // environment variable.
  3132. //
  3133. // Type: string
  3134. // RequirementLevel: Optional
  3135. // Stability: experimental
  3136. // Examples: 'job-name-xxxx', 'sample-job-mdw84'
  3137. GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution")
  3138. // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the
  3139. // "gcp.cloud_run.job.task_index" semantic conventions. It represents the
  3140. // index for a task within an execution as provided by the
  3141. // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  3142. // environment variable.
  3143. //
  3144. // Type: int
  3145. // RequirementLevel: Optional
  3146. // Stability: experimental
  3147. // Examples: 0, 1
  3148. GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index")
  3149. )
  3150. // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the
  3151. // "gcp.cloud_run.job.execution" semantic conventions. It represents the name
  3152. // of the Cloud Run
  3153. // [execution](https://cloud.google.com/run/docs/managing/job-executions) being
  3154. // run for the Job, as set by the
  3155. // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  3156. // environment variable.
  3157. func GCPCloudRunJobExecution(val string) attribute.KeyValue {
  3158. return GCPCloudRunJobExecutionKey.String(val)
  3159. }
  3160. // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the
  3161. // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index
  3162. // for a task within an execution as provided by the
  3163. // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars)
  3164. // environment variable.
  3165. func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue {
  3166. return GCPCloudRunJobTaskIndexKey.Int(val)
  3167. }
  3168. // Attributes for Google Compute Engine (GCE).
  3169. const (
  3170. // GCPGceInstanceHostnameKey is the attribute Key conforming to the
  3171. // "gcp.gce.instance.hostname" semantic conventions. It represents the
  3172. // hostname of a GCE instance. This is the full value of the default or
  3173. // [custom
  3174. // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
  3175. //
  3176. // Type: string
  3177. // RequirementLevel: Optional
  3178. // Stability: experimental
  3179. // Examples: 'my-host1234.example.com',
  3180. // 'sample-vm.us-west1-b.c.my-project.internal'
  3181. GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname")
  3182. // GCPGceInstanceNameKey is the attribute Key conforming to the
  3183. // "gcp.gce.instance.name" semantic conventions. It represents the instance
  3184. // name of a GCE instance. This is the value provided by `host.name`, the
  3185. // visible name of the instance in the Cloud Console UI, and the prefix for
  3186. // the default hostname of the instance as defined by the [default internal
  3187. // DNS
  3188. // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
  3189. //
  3190. // Type: string
  3191. // RequirementLevel: Optional
  3192. // Stability: experimental
  3193. // Examples: 'instance-1', 'my-vm-name'
  3194. GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name")
  3195. )
  3196. // GCPGceInstanceHostname returns an attribute KeyValue conforming to the
  3197. // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname
  3198. // of a GCE instance. This is the full value of the default or [custom
  3199. // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm).
  3200. func GCPGceInstanceHostname(val string) attribute.KeyValue {
  3201. return GCPGceInstanceHostnameKey.String(val)
  3202. }
  3203. // GCPGceInstanceName returns an attribute KeyValue conforming to the
  3204. // "gcp.gce.instance.name" semantic conventions. It represents the instance
  3205. // name of a GCE instance. This is the value provided by `host.name`, the
  3206. // visible name of the instance in the Cloud Console UI, and the prefix for the
  3207. // default hostname of the instance as defined by the [default internal DNS
  3208. // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
  3209. func GCPGceInstanceName(val string) attribute.KeyValue {
  3210. return GCPGceInstanceNameKey.String(val)
  3211. }
  3212. // The attributes used to describe telemetry in the context of LLM (Large
  3213. // Language Models) requests and responses.
  3214. const (
  3215. // GenAiCompletionKey is the attribute Key conforming to the
  3216. // "gen_ai.completion" semantic conventions. It represents the full
  3217. // response received from the LLM.
  3218. //
  3219. // Type: string
  3220. // RequirementLevel: Optional
  3221. // Stability: experimental
  3222. // Examples: "[{'role': 'assistant', 'content': 'The capital of France is
  3223. // Paris.'}]"
  3224. // Note: It's RECOMMENDED to format completions as JSON string matching
  3225. // [OpenAI messages
  3226. // format](https://platform.openai.com/docs/guides/text-generation)
  3227. GenAiCompletionKey = attribute.Key("gen_ai.completion")
  3228. // GenAiPromptKey is the attribute Key conforming to the "gen_ai.prompt"
  3229. // semantic conventions. It represents the full prompt sent to an LLM.
  3230. //
  3231. // Type: string
  3232. // RequirementLevel: Optional
  3233. // Stability: experimental
  3234. // Examples: "[{'role': 'user', 'content': 'What is the capital of
  3235. // France?'}]"
  3236. // Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI
  3237. // messages
  3238. // format](https://platform.openai.com/docs/guides/text-generation)
  3239. GenAiPromptKey = attribute.Key("gen_ai.prompt")
  3240. // GenAiRequestMaxTokensKey is the attribute Key conforming to the
  3241. // "gen_ai.request.max_tokens" semantic conventions. It represents the
  3242. // maximum number of tokens the LLM generates for a request.
  3243. //
  3244. // Type: int
  3245. // RequirementLevel: Optional
  3246. // Stability: experimental
  3247. // Examples: 100
  3248. GenAiRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens")
  3249. // GenAiRequestModelKey is the attribute Key conforming to the
  3250. // "gen_ai.request.model" semantic conventions. It represents the name of
  3251. // the LLM a request is being made to.
  3252. //
  3253. // Type: string
  3254. // RequirementLevel: Optional
  3255. // Stability: experimental
  3256. // Examples: 'gpt-4'
  3257. GenAiRequestModelKey = attribute.Key("gen_ai.request.model")
  3258. // GenAiRequestTemperatureKey is the attribute Key conforming to the
  3259. // "gen_ai.request.temperature" semantic conventions. It represents the
  3260. // temperature setting for the LLM request.
  3261. //
  3262. // Type: double
  3263. // RequirementLevel: Optional
  3264. // Stability: experimental
  3265. // Examples: 0.0
  3266. GenAiRequestTemperatureKey = attribute.Key("gen_ai.request.temperature")
  3267. // GenAiRequestTopPKey is the attribute Key conforming to the
  3268. // "gen_ai.request.top_p" semantic conventions. It represents the top_p
  3269. // sampling setting for the LLM request.
  3270. //
  3271. // Type: double
  3272. // RequirementLevel: Optional
  3273. // Stability: experimental
  3274. // Examples: 1.0
  3275. GenAiRequestTopPKey = attribute.Key("gen_ai.request.top_p")
  3276. // GenAiResponseFinishReasonsKey is the attribute Key conforming to the
  3277. // "gen_ai.response.finish_reasons" semantic conventions. It represents the
  3278. // array of reasons the model stopped generating tokens, corresponding to
  3279. // each generation received.
  3280. //
  3281. // Type: string[]
  3282. // RequirementLevel: Optional
  3283. // Stability: experimental
  3284. // Examples: 'stop'
  3285. GenAiResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons")
  3286. // GenAiResponseIDKey is the attribute Key conforming to the
  3287. // "gen_ai.response.id" semantic conventions. It represents the unique
  3288. // identifier for the completion.
  3289. //
  3290. // Type: string
  3291. // RequirementLevel: Optional
  3292. // Stability: experimental
  3293. // Examples: 'chatcmpl-123'
  3294. GenAiResponseIDKey = attribute.Key("gen_ai.response.id")
  3295. // GenAiResponseModelKey is the attribute Key conforming to the
  3296. // "gen_ai.response.model" semantic conventions. It represents the name of
  3297. // the LLM a response was generated from.
  3298. //
  3299. // Type: string
  3300. // RequirementLevel: Optional
  3301. // Stability: experimental
  3302. // Examples: 'gpt-4-0613'
  3303. GenAiResponseModelKey = attribute.Key("gen_ai.response.model")
  3304. // GenAiSystemKey is the attribute Key conforming to the "gen_ai.system"
  3305. // semantic conventions. It represents the Generative AI product as
  3306. // identified by the client instrumentation.
  3307. //
  3308. // Type: Enum
  3309. // RequirementLevel: Optional
  3310. // Stability: experimental
  3311. // Examples: 'openai'
  3312. // Note: The actual GenAI product may differ from the one identified by the
  3313. // client. For example, when using OpenAI client libraries to communicate
  3314. // with Mistral, the `gen_ai.system` is set to `openai` based on the
  3315. // instrumentation's best knowledge.
  3316. GenAiSystemKey = attribute.Key("gen_ai.system")
  3317. // GenAiUsageCompletionTokensKey is the attribute Key conforming to the
  3318. // "gen_ai.usage.completion_tokens" semantic conventions. It represents the
  3319. // number of tokens used in the LLM response (completion).
  3320. //
  3321. // Type: int
  3322. // RequirementLevel: Optional
  3323. // Stability: experimental
  3324. // Examples: 180
  3325. GenAiUsageCompletionTokensKey = attribute.Key("gen_ai.usage.completion_tokens")
  3326. // GenAiUsagePromptTokensKey is the attribute Key conforming to the
  3327. // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the
  3328. // number of tokens used in the LLM prompt.
  3329. //
  3330. // Type: int
  3331. // RequirementLevel: Optional
  3332. // Stability: experimental
  3333. // Examples: 100
  3334. GenAiUsagePromptTokensKey = attribute.Key("gen_ai.usage.prompt_tokens")
  3335. )
  3336. var (
  3337. // OpenAI
  3338. GenAiSystemOpenai = GenAiSystemKey.String("openai")
  3339. )
  3340. // GenAiCompletion returns an attribute KeyValue conforming to the
  3341. // "gen_ai.completion" semantic conventions. It represents the full response
  3342. // received from the LLM.
  3343. func GenAiCompletion(val string) attribute.KeyValue {
  3344. return GenAiCompletionKey.String(val)
  3345. }
  3346. // GenAiPrompt returns an attribute KeyValue conforming to the
  3347. // "gen_ai.prompt" semantic conventions. It represents the full prompt sent to
  3348. // an LLM.
  3349. func GenAiPrompt(val string) attribute.KeyValue {
  3350. return GenAiPromptKey.String(val)
  3351. }
  3352. // GenAiRequestMaxTokens returns an attribute KeyValue conforming to the
  3353. // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum
  3354. // number of tokens the LLM generates for a request.
  3355. func GenAiRequestMaxTokens(val int) attribute.KeyValue {
  3356. return GenAiRequestMaxTokensKey.Int(val)
  3357. }
  3358. // GenAiRequestModel returns an attribute KeyValue conforming to the
  3359. // "gen_ai.request.model" semantic conventions. It represents the name of the
  3360. // LLM a request is being made to.
  3361. func GenAiRequestModel(val string) attribute.KeyValue {
  3362. return GenAiRequestModelKey.String(val)
  3363. }
  3364. // GenAiRequestTemperature returns an attribute KeyValue conforming to the
  3365. // "gen_ai.request.temperature" semantic conventions. It represents the
  3366. // temperature setting for the LLM request.
  3367. func GenAiRequestTemperature(val float64) attribute.KeyValue {
  3368. return GenAiRequestTemperatureKey.Float64(val)
  3369. }
  3370. // GenAiRequestTopP returns an attribute KeyValue conforming to the
  3371. // "gen_ai.request.top_p" semantic conventions. It represents the top_p
  3372. // sampling setting for the LLM request.
  3373. func GenAiRequestTopP(val float64) attribute.KeyValue {
  3374. return GenAiRequestTopPKey.Float64(val)
  3375. }
  3376. // GenAiResponseFinishReasons returns an attribute KeyValue conforming to
  3377. // the "gen_ai.response.finish_reasons" semantic conventions. It represents the
  3378. // array of reasons the model stopped generating tokens, corresponding to each
  3379. // generation received.
  3380. func GenAiResponseFinishReasons(val ...string) attribute.KeyValue {
  3381. return GenAiResponseFinishReasonsKey.StringSlice(val)
  3382. }
  3383. // GenAiResponseID returns an attribute KeyValue conforming to the
  3384. // "gen_ai.response.id" semantic conventions. It represents the unique
  3385. // identifier for the completion.
  3386. func GenAiResponseID(val string) attribute.KeyValue {
  3387. return GenAiResponseIDKey.String(val)
  3388. }
  3389. // GenAiResponseModel returns an attribute KeyValue conforming to the
  3390. // "gen_ai.response.model" semantic conventions. It represents the name of the
  3391. // LLM a response was generated from.
  3392. func GenAiResponseModel(val string) attribute.KeyValue {
  3393. return GenAiResponseModelKey.String(val)
  3394. }
  3395. // GenAiUsageCompletionTokens returns an attribute KeyValue conforming to
  3396. // the "gen_ai.usage.completion_tokens" semantic conventions. It represents the
  3397. // number of tokens used in the LLM response (completion).
  3398. func GenAiUsageCompletionTokens(val int) attribute.KeyValue {
  3399. return GenAiUsageCompletionTokensKey.Int(val)
  3400. }
  3401. // GenAiUsagePromptTokens returns an attribute KeyValue conforming to the
  3402. // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the number
  3403. // of tokens used in the LLM prompt.
  3404. func GenAiUsagePromptTokens(val int) attribute.KeyValue {
  3405. return GenAiUsagePromptTokensKey.Int(val)
  3406. }
  3407. // Attributes for GraphQL.
  3408. const (
  3409. // GraphqlDocumentKey is the attribute Key conforming to the
  3410. // "graphql.document" semantic conventions. It represents the GraphQL
  3411. // document being executed.
  3412. //
  3413. // Type: string
  3414. // RequirementLevel: Optional
  3415. // Stability: experimental
  3416. // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
  3417. // Note: The value may be sanitized to exclude sensitive information.
  3418. GraphqlDocumentKey = attribute.Key("graphql.document")
  3419. // GraphqlOperationNameKey is the attribute Key conforming to the
  3420. // "graphql.operation.name" semantic conventions. It represents the name of
  3421. // the operation being executed.
  3422. //
  3423. // Type: string
  3424. // RequirementLevel: Optional
  3425. // Stability: experimental
  3426. // Examples: 'findBookByID'
  3427. GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
  3428. // GraphqlOperationTypeKey is the attribute Key conforming to the
  3429. // "graphql.operation.type" semantic conventions. It represents the type of
  3430. // the operation being executed.
  3431. //
  3432. // Type: Enum
  3433. // RequirementLevel: Optional
  3434. // Stability: experimental
  3435. // Examples: 'query', 'mutation', 'subscription'
  3436. GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
  3437. )
  3438. var (
  3439. // GraphQL query
  3440. GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
  3441. // GraphQL mutation
  3442. GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
  3443. // GraphQL subscription
  3444. GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
  3445. )
  3446. // GraphqlDocument returns an attribute KeyValue conforming to the
  3447. // "graphql.document" semantic conventions. It represents the GraphQL document
  3448. // being executed.
  3449. func GraphqlDocument(val string) attribute.KeyValue {
  3450. return GraphqlDocumentKey.String(val)
  3451. }
  3452. // GraphqlOperationName returns an attribute KeyValue conforming to the
  3453. // "graphql.operation.name" semantic conventions. It represents the name of the
  3454. // operation being executed.
  3455. func GraphqlOperationName(val string) attribute.KeyValue {
  3456. return GraphqlOperationNameKey.String(val)
  3457. }
  3458. // Attributes for the Android platform on which the Android application is
  3459. // running.
  3460. const (
  3461. // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id"
  3462. // semantic conventions. It represents the unique identifier for the
  3463. // application
  3464. //
  3465. // Type: string
  3466. // RequirementLevel: Optional
  3467. // Stability: experimental
  3468. // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da'
  3469. HerokuAppIDKey = attribute.Key("heroku.app.id")
  3470. // HerokuReleaseCommitKey is the attribute Key conforming to the
  3471. // "heroku.release.commit" semantic conventions. It represents the commit
  3472. // hash for the current release
  3473. //
  3474. // Type: string
  3475. // RequirementLevel: Optional
  3476. // Stability: experimental
  3477. // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec'
  3478. HerokuReleaseCommitKey = attribute.Key("heroku.release.commit")
  3479. // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the
  3480. // "heroku.release.creation_timestamp" semantic conventions. It represents
  3481. // the time and date the release was created
  3482. //
  3483. // Type: string
  3484. // RequirementLevel: Optional
  3485. // Stability: experimental
  3486. // Examples: '2022-10-23T18:00:42Z'
  3487. HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp")
  3488. )
  3489. // HerokuAppID returns an attribute KeyValue conforming to the
  3490. // "heroku.app.id" semantic conventions. It represents the unique identifier
  3491. // for the application
  3492. func HerokuAppID(val string) attribute.KeyValue {
  3493. return HerokuAppIDKey.String(val)
  3494. }
  3495. // HerokuReleaseCommit returns an attribute KeyValue conforming to the
  3496. // "heroku.release.commit" semantic conventions. It represents the commit hash
  3497. // for the current release
  3498. func HerokuReleaseCommit(val string) attribute.KeyValue {
  3499. return HerokuReleaseCommitKey.String(val)
  3500. }
  3501. // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming
  3502. // to the "heroku.release.creation_timestamp" semantic conventions. It
  3503. // represents the time and date the release was created
  3504. func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue {
  3505. return HerokuReleaseCreationTimestampKey.String(val)
  3506. }
  3507. // A host is defined as a computing instance. For example, physical servers,
  3508. // virtual machines, switches or disk array.
  3509. const (
  3510. // HostArchKey is the attribute Key conforming to the "host.arch" semantic
  3511. // conventions. It represents the CPU architecture the host system is
  3512. // running on.
  3513. //
  3514. // Type: Enum
  3515. // RequirementLevel: Optional
  3516. // Stability: experimental
  3517. HostArchKey = attribute.Key("host.arch")
  3518. // HostCPUCacheL2SizeKey is the attribute Key conforming to the
  3519. // "host.cpu.cache.l2.size" semantic conventions. It represents the amount
  3520. // of level 2 memory cache available to the processor (in Bytes).
  3521. //
  3522. // Type: int
  3523. // RequirementLevel: Optional
  3524. // Stability: experimental
  3525. // Examples: 12288000
  3526. HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size")
  3527. // HostCPUFamilyKey is the attribute Key conforming to the
  3528. // "host.cpu.family" semantic conventions. It represents the family or
  3529. // generation of the CPU.
  3530. //
  3531. // Type: string
  3532. // RequirementLevel: Optional
  3533. // Stability: experimental
  3534. // Examples: '6', 'PA-RISC 1.1e'
  3535. HostCPUFamilyKey = attribute.Key("host.cpu.family")
  3536. // HostCPUModelIDKey is the attribute Key conforming to the
  3537. // "host.cpu.model.id" semantic conventions. It represents the model
  3538. // identifier. It provides more granular information about the CPU,
  3539. // distinguishing it from other CPUs within the same family.
  3540. //
  3541. // Type: string
  3542. // RequirementLevel: Optional
  3543. // Stability: experimental
  3544. // Examples: '6', '9000/778/B180L'
  3545. HostCPUModelIDKey = attribute.Key("host.cpu.model.id")
  3546. // HostCPUModelNameKey is the attribute Key conforming to the
  3547. // "host.cpu.model.name" semantic conventions. It represents the model
  3548. // designation of the processor.
  3549. //
  3550. // Type: string
  3551. // RequirementLevel: Optional
  3552. // Stability: experimental
  3553. // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
  3554. HostCPUModelNameKey = attribute.Key("host.cpu.model.name")
  3555. // HostCPUSteppingKey is the attribute Key conforming to the
  3556. // "host.cpu.stepping" semantic conventions. It represents the stepping or
  3557. // core revisions.
  3558. //
  3559. // Type: string
  3560. // RequirementLevel: Optional
  3561. // Stability: experimental
  3562. // Examples: '1', 'r1p1'
  3563. HostCPUSteppingKey = attribute.Key("host.cpu.stepping")
  3564. // HostCPUVendorIDKey is the attribute Key conforming to the
  3565. // "host.cpu.vendor.id" semantic conventions. It represents the processor
  3566. // manufacturer identifier. A maximum 12-character string.
  3567. //
  3568. // Type: string
  3569. // RequirementLevel: Optional
  3570. // Stability: experimental
  3571. // Examples: 'GenuineIntel'
  3572. // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor
  3573. // ID string in EBX, EDX and ECX registers. Writing these to memory in this
  3574. // order results in a 12-character string.
  3575. HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id")
  3576. // HostIDKey is the attribute Key conforming to the "host.id" semantic
  3577. // conventions. It represents the unique host ID. For Cloud, this must be
  3578. // the instance_id assigned by the cloud provider. For non-containerized
  3579. // systems, this should be the `machine-id`. See the table below for the
  3580. // sources to use to determine the `machine-id` based on operating system.
  3581. //
  3582. // Type: string
  3583. // RequirementLevel: Optional
  3584. // Stability: experimental
  3585. // Examples: 'fdbf79e8af94cb7f9e8df36789187052'
  3586. HostIDKey = attribute.Key("host.id")
  3587. // HostImageIDKey is the attribute Key conforming to the "host.image.id"
  3588. // semantic conventions. It represents the vM image ID or host OS image ID.
  3589. // For Cloud, this value is from the provider.
  3590. //
  3591. // Type: string
  3592. // RequirementLevel: Optional
  3593. // Stability: experimental
  3594. // Examples: 'ami-07b06b442921831e5'
  3595. HostImageIDKey = attribute.Key("host.image.id")
  3596. // HostImageNameKey is the attribute Key conforming to the
  3597. // "host.image.name" semantic conventions. It represents the name of the VM
  3598. // image or OS install the host was instantiated from.
  3599. //
  3600. // Type: string
  3601. // RequirementLevel: Optional
  3602. // Stability: experimental
  3603. // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905'
  3604. HostImageNameKey = attribute.Key("host.image.name")
  3605. // HostImageVersionKey is the attribute Key conforming to the
  3606. // "host.image.version" semantic conventions. It represents the version
  3607. // string of the VM image or host OS as defined in [Version
  3608. // Attributes](/docs/resource/README.md#version-attributes).
  3609. //
  3610. // Type: string
  3611. // RequirementLevel: Optional
  3612. // Stability: experimental
  3613. // Examples: '0.1'
  3614. HostImageVersionKey = attribute.Key("host.image.version")
  3615. // HostIPKey is the attribute Key conforming to the "host.ip" semantic
  3616. // conventions. It represents the available IP addresses of the host,
  3617. // excluding loopback interfaces.
  3618. //
  3619. // Type: string[]
  3620. // RequirementLevel: Optional
  3621. // Stability: experimental
  3622. // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e'
  3623. // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6
  3624. // addresses MUST be specified in the [RFC
  3625. // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format.
  3626. HostIPKey = attribute.Key("host.ip")
  3627. // HostMacKey is the attribute Key conforming to the "host.mac" semantic
  3628. // conventions. It represents the available MAC addresses of the host,
  3629. // excluding loopback interfaces.
  3630. //
  3631. // Type: string[]
  3632. // RequirementLevel: Optional
  3633. // Stability: experimental
  3634. // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F'
  3635. // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal
  3636. // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
  3637. // as hyphen-separated octets in uppercase hexadecimal form from most to
  3638. // least significant.
  3639. HostMacKey = attribute.Key("host.mac")
  3640. // HostNameKey is the attribute Key conforming to the "host.name" semantic
  3641. // conventions. It represents the name of the host. On Unix systems, it may
  3642. // contain what the hostname command returns, or the fully qualified
  3643. // hostname, or another name specified by the user.
  3644. //
  3645. // Type: string
  3646. // RequirementLevel: Optional
  3647. // Stability: experimental
  3648. // Examples: 'opentelemetry-test'
  3649. HostNameKey = attribute.Key("host.name")
  3650. // HostTypeKey is the attribute Key conforming to the "host.type" semantic
  3651. // conventions. It represents the type of host. For Cloud, this must be the
  3652. // machine type.
  3653. //
  3654. // Type: string
  3655. // RequirementLevel: Optional
  3656. // Stability: experimental
  3657. // Examples: 'n1-standard-1'
  3658. HostTypeKey = attribute.Key("host.type")
  3659. )
  3660. var (
  3661. // AMD64
  3662. HostArchAMD64 = HostArchKey.String("amd64")
  3663. // ARM32
  3664. HostArchARM32 = HostArchKey.String("arm32")
  3665. // ARM64
  3666. HostArchARM64 = HostArchKey.String("arm64")
  3667. // Itanium
  3668. HostArchIA64 = HostArchKey.String("ia64")
  3669. // 32-bit PowerPC
  3670. HostArchPPC32 = HostArchKey.String("ppc32")
  3671. // 64-bit PowerPC
  3672. HostArchPPC64 = HostArchKey.String("ppc64")
  3673. // IBM z/Architecture
  3674. HostArchS390x = HostArchKey.String("s390x")
  3675. // 32-bit x86
  3676. HostArchX86 = HostArchKey.String("x86")
  3677. )
  3678. // HostCPUCacheL2Size returns an attribute KeyValue conforming to the
  3679. // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of
  3680. // level 2 memory cache available to the processor (in Bytes).
  3681. func HostCPUCacheL2Size(val int) attribute.KeyValue {
  3682. return HostCPUCacheL2SizeKey.Int(val)
  3683. }
  3684. // HostCPUFamily returns an attribute KeyValue conforming to the
  3685. // "host.cpu.family" semantic conventions. It represents the family or
  3686. // generation of the CPU.
  3687. func HostCPUFamily(val string) attribute.KeyValue {
  3688. return HostCPUFamilyKey.String(val)
  3689. }
  3690. // HostCPUModelID returns an attribute KeyValue conforming to the
  3691. // "host.cpu.model.id" semantic conventions. It represents the model
  3692. // identifier. It provides more granular information about the CPU,
  3693. // distinguishing it from other CPUs within the same family.
  3694. func HostCPUModelID(val string) attribute.KeyValue {
  3695. return HostCPUModelIDKey.String(val)
  3696. }
  3697. // HostCPUModelName returns an attribute KeyValue conforming to the
  3698. // "host.cpu.model.name" semantic conventions. It represents the model
  3699. // designation of the processor.
  3700. func HostCPUModelName(val string) attribute.KeyValue {
  3701. return HostCPUModelNameKey.String(val)
  3702. }
  3703. // HostCPUStepping returns an attribute KeyValue conforming to the
  3704. // "host.cpu.stepping" semantic conventions. It represents the stepping or core
  3705. // revisions.
  3706. func HostCPUStepping(val string) attribute.KeyValue {
  3707. return HostCPUSteppingKey.String(val)
  3708. }
  3709. // HostCPUVendorID returns an attribute KeyValue conforming to the
  3710. // "host.cpu.vendor.id" semantic conventions. It represents the processor
  3711. // manufacturer identifier. A maximum 12-character string.
  3712. func HostCPUVendorID(val string) attribute.KeyValue {
  3713. return HostCPUVendorIDKey.String(val)
  3714. }
  3715. // HostID returns an attribute KeyValue conforming to the "host.id" semantic
  3716. // conventions. It represents the unique host ID. For Cloud, this must be the
  3717. // instance_id assigned by the cloud provider. For non-containerized systems,
  3718. // this should be the `machine-id`. See the table below for the sources to use
  3719. // to determine the `machine-id` based on operating system.
  3720. func HostID(val string) attribute.KeyValue {
  3721. return HostIDKey.String(val)
  3722. }
  3723. // HostImageID returns an attribute KeyValue conforming to the
  3724. // "host.image.id" semantic conventions. It represents the vM image ID or host
  3725. // OS image ID. For Cloud, this value is from the provider.
  3726. func HostImageID(val string) attribute.KeyValue {
  3727. return HostImageIDKey.String(val)
  3728. }
  3729. // HostImageName returns an attribute KeyValue conforming to the
  3730. // "host.image.name" semantic conventions. It represents the name of the VM
  3731. // image or OS install the host was instantiated from.
  3732. func HostImageName(val string) attribute.KeyValue {
  3733. return HostImageNameKey.String(val)
  3734. }
  3735. // HostImageVersion returns an attribute KeyValue conforming to the
  3736. // "host.image.version" semantic conventions. It represents the version string
  3737. // of the VM image or host OS as defined in [Version
  3738. // Attributes](/docs/resource/README.md#version-attributes).
  3739. func HostImageVersion(val string) attribute.KeyValue {
  3740. return HostImageVersionKey.String(val)
  3741. }
  3742. // HostIP returns an attribute KeyValue conforming to the "host.ip" semantic
  3743. // conventions. It represents the available IP addresses of the host, excluding
  3744. // loopback interfaces.
  3745. func HostIP(val ...string) attribute.KeyValue {
  3746. return HostIPKey.StringSlice(val)
  3747. }
  3748. // HostMac returns an attribute KeyValue conforming to the "host.mac"
  3749. // semantic conventions. It represents the available MAC addresses of the host,
  3750. // excluding loopback interfaces.
  3751. func HostMac(val ...string) attribute.KeyValue {
  3752. return HostMacKey.StringSlice(val)
  3753. }
  3754. // HostName returns an attribute KeyValue conforming to the "host.name"
  3755. // semantic conventions. It represents the name of the host. On Unix systems,
  3756. // it may contain what the hostname command returns, or the fully qualified
  3757. // hostname, or another name specified by the user.
  3758. func HostName(val string) attribute.KeyValue {
  3759. return HostNameKey.String(val)
  3760. }
  3761. // HostType returns an attribute KeyValue conforming to the "host.type"
  3762. // semantic conventions. It represents the type of host. For Cloud, this must
  3763. // be the machine type.
  3764. func HostType(val string) attribute.KeyValue {
  3765. return HostTypeKey.String(val)
  3766. }
  3767. // Semantic convention attributes in the HTTP namespace.
  3768. const (
  3769. // HTTPConnectionStateKey is the attribute Key conforming to the
  3770. // "http.connection.state" semantic conventions. It represents the state of
  3771. // the HTTP connection in the HTTP connection pool.
  3772. //
  3773. // Type: Enum
  3774. // RequirementLevel: Optional
  3775. // Stability: experimental
  3776. // Examples: 'active', 'idle'
  3777. HTTPConnectionStateKey = attribute.Key("http.connection.state")
  3778. // HTTPRequestBodySizeKey is the attribute Key conforming to the
  3779. // "http.request.body.size" semantic conventions. It represents the size of
  3780. // the request payload body in bytes. This is the number of bytes
  3781. // transferred excluding headers and is often, but not always, present as
  3782. // the
  3783. // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  3784. // header. For requests using transport encoding, this should be the
  3785. // compressed size.
  3786. //
  3787. // Type: int
  3788. // RequirementLevel: Optional
  3789. // Stability: experimental
  3790. // Examples: 3495
  3791. HTTPRequestBodySizeKey = attribute.Key("http.request.body.size")
  3792. // HTTPRequestMethodKey is the attribute Key conforming to the
  3793. // "http.request.method" semantic conventions. It represents the hTTP
  3794. // request method.
  3795. //
  3796. // Type: Enum
  3797. // RequirementLevel: Optional
  3798. // Stability: stable
  3799. // Examples: 'GET', 'POST', 'HEAD'
  3800. // Note: HTTP request method value SHOULD be "known" to the
  3801. // instrumentation.
  3802. // By default, this convention defines "known" methods as the ones listed
  3803. // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
  3804. // and the PATCH method defined in
  3805. // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).
  3806. //
  3807. // If the HTTP request method is not known to instrumentation, it MUST set
  3808. // the `http.request.method` attribute to `_OTHER`.
  3809. //
  3810. // If the HTTP instrumentation could end up converting valid HTTP request
  3811. // methods to `_OTHER`, then it MUST provide a way to override
  3812. // the list of known HTTP methods. If this override is done via environment
  3813. // variable, then the environment variable MUST be named
  3814. // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated
  3815. // list of case-sensitive known HTTP methods
  3816. // (this list MUST be a full override of the default known method, it is
  3817. // not a list of known methods in addition to the defaults).
  3818. //
  3819. // HTTP method names are case-sensitive and `http.request.method` attribute
  3820. // value MUST match a known HTTP method name exactly.
  3821. // Instrumentations for specific web frameworks that consider HTTP methods
  3822. // to be case insensitive, SHOULD populate a canonical equivalent.
  3823. // Tracing instrumentations that do so, MUST also set
  3824. // `http.request.method_original` to the original value.
  3825. HTTPRequestMethodKey = attribute.Key("http.request.method")
  3826. // HTTPRequestMethodOriginalKey is the attribute Key conforming to the
  3827. // "http.request.method_original" semantic conventions. It represents the
  3828. // original HTTP method sent by the client in the request line.
  3829. //
  3830. // Type: string
  3831. // RequirementLevel: Optional
  3832. // Stability: stable
  3833. // Examples: 'GeT', 'ACL', 'foo'
  3834. HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original")
  3835. // HTTPRequestResendCountKey is the attribute Key conforming to the
  3836. // "http.request.resend_count" semantic conventions. It represents the
  3837. // ordinal number of request resending attempt (for any reason, including
  3838. // redirects).
  3839. //
  3840. // Type: int
  3841. // RequirementLevel: Optional
  3842. // Stability: stable
  3843. // Examples: 3
  3844. // Note: The resend count SHOULD be updated each time an HTTP request gets
  3845. // resent by the client, regardless of what was the cause of the resending
  3846. // (e.g. redirection, authorization failure, 503 Server Unavailable,
  3847. // network issues, or any other).
  3848. HTTPRequestResendCountKey = attribute.Key("http.request.resend_count")
  3849. // HTTPRequestSizeKey is the attribute Key conforming to the
  3850. // "http.request.size" semantic conventions. It represents the total size
  3851. // of the request in bytes. This should be the total number of bytes sent
  3852. // over the wire, including the request line (HTTP/1.1), framing (HTTP/2
  3853. // and HTTP/3), headers, and request body if any.
  3854. //
  3855. // Type: int
  3856. // RequirementLevel: Optional
  3857. // Stability: experimental
  3858. // Examples: 1437
  3859. HTTPRequestSizeKey = attribute.Key("http.request.size")
  3860. // HTTPResponseBodySizeKey is the attribute Key conforming to the
  3861. // "http.response.body.size" semantic conventions. It represents the size
  3862. // of the response payload body in bytes. This is the number of bytes
  3863. // transferred excluding headers and is often, but not always, present as
  3864. // the
  3865. // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  3866. // header. For requests using transport encoding, this should be the
  3867. // compressed size.
  3868. //
  3869. // Type: int
  3870. // RequirementLevel: Optional
  3871. // Stability: experimental
  3872. // Examples: 3495
  3873. HTTPResponseBodySizeKey = attribute.Key("http.response.body.size")
  3874. // HTTPResponseSizeKey is the attribute Key conforming to the
  3875. // "http.response.size" semantic conventions. It represents the total size
  3876. // of the response in bytes. This should be the total number of bytes sent
  3877. // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and
  3878. // HTTP/3), headers, and response body and trailers if any.
  3879. //
  3880. // Type: int
  3881. // RequirementLevel: Optional
  3882. // Stability: experimental
  3883. // Examples: 1437
  3884. HTTPResponseSizeKey = attribute.Key("http.response.size")
  3885. // HTTPResponseStatusCodeKey is the attribute Key conforming to the
  3886. // "http.response.status_code" semantic conventions. It represents the
  3887. // [HTTP response status
  3888. // code](https://tools.ietf.org/html/rfc7231#section-6).
  3889. //
  3890. // Type: int
  3891. // RequirementLevel: Optional
  3892. // Stability: stable
  3893. // Examples: 200
  3894. HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code")
  3895. // HTTPRouteKey is the attribute Key conforming to the "http.route"
  3896. // semantic conventions. It represents the matched route, that is, the path
  3897. // template in the format used by the respective server framework.
  3898. //
  3899. // Type: string
  3900. // RequirementLevel: Optional
  3901. // Stability: stable
  3902. // Examples: '/users/:userID?', '{controller}/{action}/{id?}'
  3903. // Note: MUST NOT be populated when this is not supported by the HTTP
  3904. // server framework as the route attribute should have low-cardinality and
  3905. // the URI path can NOT substitute it.
  3906. // SHOULD include the [application
  3907. // root](/docs/http/http-spans.md#http-server-definitions) if there is one.
  3908. HTTPRouteKey = attribute.Key("http.route")
  3909. )
  3910. var (
  3911. // active state
  3912. HTTPConnectionStateActive = HTTPConnectionStateKey.String("active")
  3913. // idle state
  3914. HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle")
  3915. )
  3916. var (
  3917. // CONNECT method
  3918. HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT")
  3919. // DELETE method
  3920. HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE")
  3921. // GET method
  3922. HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET")
  3923. // HEAD method
  3924. HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD")
  3925. // OPTIONS method
  3926. HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS")
  3927. // PATCH method
  3928. HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH")
  3929. // POST method
  3930. HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST")
  3931. // PUT method
  3932. HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT")
  3933. // TRACE method
  3934. HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE")
  3935. // Any HTTP method that the instrumentation has no prior knowledge of
  3936. HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER")
  3937. )
  3938. // HTTPRequestBodySize returns an attribute KeyValue conforming to the
  3939. // "http.request.body.size" semantic conventions. It represents the size of the
  3940. // request payload body in bytes. This is the number of bytes transferred
  3941. // excluding headers and is often, but not always, present as the
  3942. // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  3943. // header. For requests using transport encoding, this should be the compressed
  3944. // size.
  3945. func HTTPRequestBodySize(val int) attribute.KeyValue {
  3946. return HTTPRequestBodySizeKey.Int(val)
  3947. }
  3948. // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the
  3949. // "http.request.method_original" semantic conventions. It represents the
  3950. // original HTTP method sent by the client in the request line.
  3951. func HTTPRequestMethodOriginal(val string) attribute.KeyValue {
  3952. return HTTPRequestMethodOriginalKey.String(val)
  3953. }
  3954. // HTTPRequestResendCount returns an attribute KeyValue conforming to the
  3955. // "http.request.resend_count" semantic conventions. It represents the ordinal
  3956. // number of request resending attempt (for any reason, including redirects).
  3957. func HTTPRequestResendCount(val int) attribute.KeyValue {
  3958. return HTTPRequestResendCountKey.Int(val)
  3959. }
  3960. // HTTPRequestSize returns an attribute KeyValue conforming to the
  3961. // "http.request.size" semantic conventions. It represents the total size of
  3962. // the request in bytes. This should be the total number of bytes sent over the
  3963. // wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
  3964. // headers, and request body if any.
  3965. func HTTPRequestSize(val int) attribute.KeyValue {
  3966. return HTTPRequestSizeKey.Int(val)
  3967. }
  3968. // HTTPResponseBodySize returns an attribute KeyValue conforming to the
  3969. // "http.response.body.size" semantic conventions. It represents the size of
  3970. // the response payload body in bytes. This is the number of bytes transferred
  3971. // excluding headers and is often, but not always, present as the
  3972. // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
  3973. // header. For requests using transport encoding, this should be the compressed
  3974. // size.
  3975. func HTTPResponseBodySize(val int) attribute.KeyValue {
  3976. return HTTPResponseBodySizeKey.Int(val)
  3977. }
  3978. // HTTPResponseSize returns an attribute KeyValue conforming to the
  3979. // "http.response.size" semantic conventions. It represents the total size of
  3980. // the response in bytes. This should be the total number of bytes sent over
  3981. // the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3),
  3982. // headers, and response body and trailers if any.
  3983. func HTTPResponseSize(val int) attribute.KeyValue {
  3984. return HTTPResponseSizeKey.Int(val)
  3985. }
  3986. // HTTPResponseStatusCode returns an attribute KeyValue conforming to the
  3987. // "http.response.status_code" semantic conventions. It represents the [HTTP
  3988. // response status code](https://tools.ietf.org/html/rfc7231#section-6).
  3989. func HTTPResponseStatusCode(val int) attribute.KeyValue {
  3990. return HTTPResponseStatusCodeKey.Int(val)
  3991. }
  3992. // HTTPRoute returns an attribute KeyValue conforming to the "http.route"
  3993. // semantic conventions. It represents the matched route, that is, the path
  3994. // template in the format used by the respective server framework.
  3995. func HTTPRoute(val string) attribute.KeyValue {
  3996. return HTTPRouteKey.String(val)
  3997. }
  3998. // Java Virtual machine related attributes.
  3999. const (
  4000. // JvmBufferPoolNameKey is the attribute Key conforming to the
  4001. // "jvm.buffer.pool.name" semantic conventions. It represents the name of
  4002. // the buffer pool.
  4003. //
  4004. // Type: string
  4005. // RequirementLevel: Optional
  4006. // Stability: experimental
  4007. // Examples: 'mapped', 'direct'
  4008. // Note: Pool names are generally obtained via
  4009. // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()).
  4010. JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name")
  4011. // JvmGcActionKey is the attribute Key conforming to the "jvm.gc.action"
  4012. // semantic conventions. It represents the name of the garbage collector
  4013. // action.
  4014. //
  4015. // Type: string
  4016. // RequirementLevel: Optional
  4017. // Stability: stable
  4018. // Examples: 'end of minor GC', 'end of major GC'
  4019. // Note: Garbage collector action is generally obtained via
  4020. // [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
  4021. JvmGcActionKey = attribute.Key("jvm.gc.action")
  4022. // JvmGcNameKey is the attribute Key conforming to the "jvm.gc.name"
  4023. // semantic conventions. It represents the name of the garbage collector.
  4024. //
  4025. // Type: string
  4026. // RequirementLevel: Optional
  4027. // Stability: stable
  4028. // Examples: 'G1 Young Generation', 'G1 Old Generation'
  4029. // Note: Garbage collector name is generally obtained via
  4030. // [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).
  4031. JvmGcNameKey = attribute.Key("jvm.gc.name")
  4032. // JvmMemoryPoolNameKey is the attribute Key conforming to the
  4033. // "jvm.memory.pool.name" semantic conventions. It represents the name of
  4034. // the memory pool.
  4035. //
  4036. // Type: string
  4037. // RequirementLevel: Optional
  4038. // Stability: stable
  4039. // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space'
  4040. // Note: Pool names are generally obtained via
  4041. // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).
  4042. JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name")
  4043. // JvmMemoryTypeKey is the attribute Key conforming to the
  4044. // "jvm.memory.type" semantic conventions. It represents the type of
  4045. // memory.
  4046. //
  4047. // Type: Enum
  4048. // RequirementLevel: Optional
  4049. // Stability: stable
  4050. // Examples: 'heap', 'non_heap'
  4051. JvmMemoryTypeKey = attribute.Key("jvm.memory.type")
  4052. // JvmThreadDaemonKey is the attribute Key conforming to the
  4053. // "jvm.thread.daemon" semantic conventions. It represents the whether the
  4054. // thread is daemon or not.
  4055. //
  4056. // Type: boolean
  4057. // RequirementLevel: Optional
  4058. // Stability: stable
  4059. JvmThreadDaemonKey = attribute.Key("jvm.thread.daemon")
  4060. // JvmThreadStateKey is the attribute Key conforming to the
  4061. // "jvm.thread.state" semantic conventions. It represents the state of the
  4062. // thread.
  4063. //
  4064. // Type: Enum
  4065. // RequirementLevel: Optional
  4066. // Stability: stable
  4067. // Examples: 'runnable', 'blocked'
  4068. JvmThreadStateKey = attribute.Key("jvm.thread.state")
  4069. )
  4070. var (
  4071. // Heap memory
  4072. JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap")
  4073. // Non-heap memory
  4074. JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap")
  4075. )
  4076. var (
  4077. // A thread that has not yet started is in this state
  4078. JvmThreadStateNew = JvmThreadStateKey.String("new")
  4079. // A thread executing in the Java virtual machine is in this state
  4080. JvmThreadStateRunnable = JvmThreadStateKey.String("runnable")
  4081. // A thread that is blocked waiting for a monitor lock is in this state
  4082. JvmThreadStateBlocked = JvmThreadStateKey.String("blocked")
  4083. // A thread that is waiting indefinitely for another thread to perform a particular action is in this state
  4084. JvmThreadStateWaiting = JvmThreadStateKey.String("waiting")
  4085. // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state
  4086. JvmThreadStateTimedWaiting = JvmThreadStateKey.String("timed_waiting")
  4087. // A thread that has exited is in this state
  4088. JvmThreadStateTerminated = JvmThreadStateKey.String("terminated")
  4089. )
  4090. // JvmBufferPoolName returns an attribute KeyValue conforming to the
  4091. // "jvm.buffer.pool.name" semantic conventions. It represents the name of the
  4092. // buffer pool.
  4093. func JvmBufferPoolName(val string) attribute.KeyValue {
  4094. return JvmBufferPoolNameKey.String(val)
  4095. }
  4096. // JvmGcAction returns an attribute KeyValue conforming to the
  4097. // "jvm.gc.action" semantic conventions. It represents the name of the garbage
  4098. // collector action.
  4099. func JvmGcAction(val string) attribute.KeyValue {
  4100. return JvmGcActionKey.String(val)
  4101. }
  4102. // JvmGcName returns an attribute KeyValue conforming to the "jvm.gc.name"
  4103. // semantic conventions. It represents the name of the garbage collector.
  4104. func JvmGcName(val string) attribute.KeyValue {
  4105. return JvmGcNameKey.String(val)
  4106. }
  4107. // JvmMemoryPoolName returns an attribute KeyValue conforming to the
  4108. // "jvm.memory.pool.name" semantic conventions. It represents the name of the
  4109. // memory pool.
  4110. func JvmMemoryPoolName(val string) attribute.KeyValue {
  4111. return JvmMemoryPoolNameKey.String(val)
  4112. }
  4113. // JvmThreadDaemon returns an attribute KeyValue conforming to the
  4114. // "jvm.thread.daemon" semantic conventions. It represents the whether the
  4115. // thread is daemon or not.
  4116. func JvmThreadDaemon(val bool) attribute.KeyValue {
  4117. return JvmThreadDaemonKey.Bool(val)
  4118. }
  4119. // Kubernetes resource attributes.
  4120. const (
  4121. // K8SClusterNameKey is the attribute Key conforming to the
  4122. // "k8s.cluster.name" semantic conventions. It represents the name of the
  4123. // cluster.
  4124. //
  4125. // Type: string
  4126. // RequirementLevel: Optional
  4127. // Stability: experimental
  4128. // Examples: 'opentelemetry-cluster'
  4129. K8SClusterNameKey = attribute.Key("k8s.cluster.name")
  4130. // K8SClusterUIDKey is the attribute Key conforming to the
  4131. // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for
  4132. // the cluster, set to the UID of the `kube-system` namespace.
  4133. //
  4134. // Type: string
  4135. // RequirementLevel: Optional
  4136. // Stability: experimental
  4137. // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d'
  4138. // Note: K8S doesn't have support for obtaining a cluster ID. If this is
  4139. // ever
  4140. // added, we will recommend collecting the `k8s.cluster.uid` through the
  4141. // official APIs. In the meantime, we are able to use the `uid` of the
  4142. // `kube-system` namespace as a proxy for cluster ID. Read on for the
  4143. // rationale.
  4144. //
  4145. // Every object created in a K8S cluster is assigned a distinct UID. The
  4146. // `kube-system` namespace is used by Kubernetes itself and will exist
  4147. // for the lifetime of the cluster. Using the `uid` of the `kube-system`
  4148. // namespace is a reasonable proxy for the K8S ClusterID as it will only
  4149. // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are
  4150. // UUIDs as standardized by
  4151. // [ISO/IEC 9834-8 and ITU-T
  4152. // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html).
  4153. // Which states:
  4154. //
  4155. // > If generated according to one of the mechanisms defined in Rec.
  4156. // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be
  4157. // different from all other UUIDs generated before 3603 A.D., or is
  4158. // extremely likely to be different (depending on the mechanism chosen).
  4159. //
  4160. // Therefore, UIDs between clusters should be extremely unlikely to
  4161. // conflict.
  4162. K8SClusterUIDKey = attribute.Key("k8s.cluster.uid")
  4163. // K8SContainerNameKey is the attribute Key conforming to the
  4164. // "k8s.container.name" semantic conventions. It represents the name of the
  4165. // Container from Pod specification, must be unique within a Pod. Container
  4166. // runtime usually uses different globally unique name (`container.name`).
  4167. //
  4168. // Type: string
  4169. // RequirementLevel: Optional
  4170. // Stability: experimental
  4171. // Examples: 'redis'
  4172. K8SContainerNameKey = attribute.Key("k8s.container.name")
  4173. // K8SContainerRestartCountKey is the attribute Key conforming to the
  4174. // "k8s.container.restart_count" semantic conventions. It represents the
  4175. // number of times the container was restarted. This attribute can be used
  4176. // to identify a particular container (running or stopped) within a
  4177. // container spec.
  4178. //
  4179. // Type: int
  4180. // RequirementLevel: Optional
  4181. // Stability: experimental
  4182. K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count")
  4183. // K8SContainerStatusLastTerminatedReasonKey is the attribute Key
  4184. // conforming to the "k8s.container.status.last_terminated_reason" semantic
  4185. // conventions. It represents the last terminated reason of the Container.
  4186. //
  4187. // Type: string
  4188. // RequirementLevel: Optional
  4189. // Stability: experimental
  4190. // Examples: 'Evicted', 'Error'
  4191. K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason")
  4192. // K8SCronJobNameKey is the attribute Key conforming to the
  4193. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  4194. // CronJob.
  4195. //
  4196. // Type: string
  4197. // RequirementLevel: Optional
  4198. // Stability: experimental
  4199. // Examples: 'opentelemetry'
  4200. K8SCronJobNameKey = attribute.Key("k8s.cronjob.name")
  4201. // K8SCronJobUIDKey is the attribute Key conforming to the
  4202. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  4203. // CronJob.
  4204. //
  4205. // Type: string
  4206. // RequirementLevel: Optional
  4207. // Stability: experimental
  4208. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4209. K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid")
  4210. // K8SDaemonSetNameKey is the attribute Key conforming to the
  4211. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  4212. // DaemonSet.
  4213. //
  4214. // Type: string
  4215. // RequirementLevel: Optional
  4216. // Stability: experimental
  4217. // Examples: 'opentelemetry'
  4218. K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name")
  4219. // K8SDaemonSetUIDKey is the attribute Key conforming to the
  4220. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  4221. // DaemonSet.
  4222. //
  4223. // Type: string
  4224. // RequirementLevel: Optional
  4225. // Stability: experimental
  4226. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4227. K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid")
  4228. // K8SDeploymentNameKey is the attribute Key conforming to the
  4229. // "k8s.deployment.name" semantic conventions. It represents the name of
  4230. // the Deployment.
  4231. //
  4232. // Type: string
  4233. // RequirementLevel: Optional
  4234. // Stability: experimental
  4235. // Examples: 'opentelemetry'
  4236. K8SDeploymentNameKey = attribute.Key("k8s.deployment.name")
  4237. // K8SDeploymentUIDKey is the attribute Key conforming to the
  4238. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  4239. // Deployment.
  4240. //
  4241. // Type: string
  4242. // RequirementLevel: Optional
  4243. // Stability: experimental
  4244. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4245. K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid")
  4246. // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name"
  4247. // semantic conventions. It represents the name of the Job.
  4248. //
  4249. // Type: string
  4250. // RequirementLevel: Optional
  4251. // Stability: experimental
  4252. // Examples: 'opentelemetry'
  4253. K8SJobNameKey = attribute.Key("k8s.job.name")
  4254. // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid"
  4255. // semantic conventions. It represents the UID of the Job.
  4256. //
  4257. // Type: string
  4258. // RequirementLevel: Optional
  4259. // Stability: experimental
  4260. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4261. K8SJobUIDKey = attribute.Key("k8s.job.uid")
  4262. // K8SNamespaceNameKey is the attribute Key conforming to the
  4263. // "k8s.namespace.name" semantic conventions. It represents the name of the
  4264. // namespace that the pod is running in.
  4265. //
  4266. // Type: string
  4267. // RequirementLevel: Optional
  4268. // Stability: experimental
  4269. // Examples: 'default'
  4270. K8SNamespaceNameKey = attribute.Key("k8s.namespace.name")
  4271. // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name"
  4272. // semantic conventions. It represents the name of the Node.
  4273. //
  4274. // Type: string
  4275. // RequirementLevel: Optional
  4276. // Stability: experimental
  4277. // Examples: 'node-1'
  4278. K8SNodeNameKey = attribute.Key("k8s.node.name")
  4279. // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid"
  4280. // semantic conventions. It represents the UID of the Node.
  4281. //
  4282. // Type: string
  4283. // RequirementLevel: Optional
  4284. // Stability: experimental
  4285. // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2'
  4286. K8SNodeUIDKey = attribute.Key("k8s.node.uid")
  4287. // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name"
  4288. // semantic conventions. It represents the name of the Pod.
  4289. //
  4290. // Type: string
  4291. // RequirementLevel: Optional
  4292. // Stability: experimental
  4293. // Examples: 'opentelemetry-pod-autoconf'
  4294. K8SPodNameKey = attribute.Key("k8s.pod.name")
  4295. // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid"
  4296. // semantic conventions. It represents the UID of the Pod.
  4297. //
  4298. // Type: string
  4299. // RequirementLevel: Optional
  4300. // Stability: experimental
  4301. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4302. K8SPodUIDKey = attribute.Key("k8s.pod.uid")
  4303. // K8SReplicaSetNameKey is the attribute Key conforming to the
  4304. // "k8s.replicaset.name" semantic conventions. It represents the name of
  4305. // the ReplicaSet.
  4306. //
  4307. // Type: string
  4308. // RequirementLevel: Optional
  4309. // Stability: experimental
  4310. // Examples: 'opentelemetry'
  4311. K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name")
  4312. // K8SReplicaSetUIDKey is the attribute Key conforming to the
  4313. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  4314. // ReplicaSet.
  4315. //
  4316. // Type: string
  4317. // RequirementLevel: Optional
  4318. // Stability: experimental
  4319. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4320. K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid")
  4321. // K8SStatefulSetNameKey is the attribute Key conforming to the
  4322. // "k8s.statefulset.name" semantic conventions. It represents the name of
  4323. // the StatefulSet.
  4324. //
  4325. // Type: string
  4326. // RequirementLevel: Optional
  4327. // Stability: experimental
  4328. // Examples: 'opentelemetry'
  4329. K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name")
  4330. // K8SStatefulSetUIDKey is the attribute Key conforming to the
  4331. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  4332. // StatefulSet.
  4333. //
  4334. // Type: string
  4335. // RequirementLevel: Optional
  4336. // Stability: experimental
  4337. // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff'
  4338. K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid")
  4339. )
  4340. // K8SClusterName returns an attribute KeyValue conforming to the
  4341. // "k8s.cluster.name" semantic conventions. It represents the name of the
  4342. // cluster.
  4343. func K8SClusterName(val string) attribute.KeyValue {
  4344. return K8SClusterNameKey.String(val)
  4345. }
  4346. // K8SClusterUID returns an attribute KeyValue conforming to the
  4347. // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the
  4348. // cluster, set to the UID of the `kube-system` namespace.
  4349. func K8SClusterUID(val string) attribute.KeyValue {
  4350. return K8SClusterUIDKey.String(val)
  4351. }
  4352. // K8SContainerName returns an attribute KeyValue conforming to the
  4353. // "k8s.container.name" semantic conventions. It represents the name of the
  4354. // Container from Pod specification, must be unique within a Pod. Container
  4355. // runtime usually uses different globally unique name (`container.name`).
  4356. func K8SContainerName(val string) attribute.KeyValue {
  4357. return K8SContainerNameKey.String(val)
  4358. }
  4359. // K8SContainerRestartCount returns an attribute KeyValue conforming to the
  4360. // "k8s.container.restart_count" semantic conventions. It represents the number
  4361. // of times the container was restarted. This attribute can be used to identify
  4362. // a particular container (running or stopped) within a container spec.
  4363. func K8SContainerRestartCount(val int) attribute.KeyValue {
  4364. return K8SContainerRestartCountKey.Int(val)
  4365. }
  4366. // K8SContainerStatusLastTerminatedReason returns an attribute KeyValue
  4367. // conforming to the "k8s.container.status.last_terminated_reason" semantic
  4368. // conventions. It represents the last terminated reason of the Container.
  4369. func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue {
  4370. return K8SContainerStatusLastTerminatedReasonKey.String(val)
  4371. }
  4372. // K8SCronJobName returns an attribute KeyValue conforming to the
  4373. // "k8s.cronjob.name" semantic conventions. It represents the name of the
  4374. // CronJob.
  4375. func K8SCronJobName(val string) attribute.KeyValue {
  4376. return K8SCronJobNameKey.String(val)
  4377. }
  4378. // K8SCronJobUID returns an attribute KeyValue conforming to the
  4379. // "k8s.cronjob.uid" semantic conventions. It represents the UID of the
  4380. // CronJob.
  4381. func K8SCronJobUID(val string) attribute.KeyValue {
  4382. return K8SCronJobUIDKey.String(val)
  4383. }
  4384. // K8SDaemonSetName returns an attribute KeyValue conforming to the
  4385. // "k8s.daemonset.name" semantic conventions. It represents the name of the
  4386. // DaemonSet.
  4387. func K8SDaemonSetName(val string) attribute.KeyValue {
  4388. return K8SDaemonSetNameKey.String(val)
  4389. }
  4390. // K8SDaemonSetUID returns an attribute KeyValue conforming to the
  4391. // "k8s.daemonset.uid" semantic conventions. It represents the UID of the
  4392. // DaemonSet.
  4393. func K8SDaemonSetUID(val string) attribute.KeyValue {
  4394. return K8SDaemonSetUIDKey.String(val)
  4395. }
  4396. // K8SDeploymentName returns an attribute KeyValue conforming to the
  4397. // "k8s.deployment.name" semantic conventions. It represents the name of the
  4398. // Deployment.
  4399. func K8SDeploymentName(val string) attribute.KeyValue {
  4400. return K8SDeploymentNameKey.String(val)
  4401. }
  4402. // K8SDeploymentUID returns an attribute KeyValue conforming to the
  4403. // "k8s.deployment.uid" semantic conventions. It represents the UID of the
  4404. // Deployment.
  4405. func K8SDeploymentUID(val string) attribute.KeyValue {
  4406. return K8SDeploymentUIDKey.String(val)
  4407. }
  4408. // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name"
  4409. // semantic conventions. It represents the name of the Job.
  4410. func K8SJobName(val string) attribute.KeyValue {
  4411. return K8SJobNameKey.String(val)
  4412. }
  4413. // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid"
  4414. // semantic conventions. It represents the UID of the Job.
  4415. func K8SJobUID(val string) attribute.KeyValue {
  4416. return K8SJobUIDKey.String(val)
  4417. }
  4418. // K8SNamespaceName returns an attribute KeyValue conforming to the
  4419. // "k8s.namespace.name" semantic conventions. It represents the name of the
  4420. // namespace that the pod is running in.
  4421. func K8SNamespaceName(val string) attribute.KeyValue {
  4422. return K8SNamespaceNameKey.String(val)
  4423. }
  4424. // K8SNodeName returns an attribute KeyValue conforming to the
  4425. // "k8s.node.name" semantic conventions. It represents the name of the Node.
  4426. func K8SNodeName(val string) attribute.KeyValue {
  4427. return K8SNodeNameKey.String(val)
  4428. }
  4429. // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid"
  4430. // semantic conventions. It represents the UID of the Node.
  4431. func K8SNodeUID(val string) attribute.KeyValue {
  4432. return K8SNodeUIDKey.String(val)
  4433. }
  4434. // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name"
  4435. // semantic conventions. It represents the name of the Pod.
  4436. func K8SPodName(val string) attribute.KeyValue {
  4437. return K8SPodNameKey.String(val)
  4438. }
  4439. // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid"
  4440. // semantic conventions. It represents the UID of the Pod.
  4441. func K8SPodUID(val string) attribute.KeyValue {
  4442. return K8SPodUIDKey.String(val)
  4443. }
  4444. // K8SReplicaSetName returns an attribute KeyValue conforming to the
  4445. // "k8s.replicaset.name" semantic conventions. It represents the name of the
  4446. // ReplicaSet.
  4447. func K8SReplicaSetName(val string) attribute.KeyValue {
  4448. return K8SReplicaSetNameKey.String(val)
  4449. }
  4450. // K8SReplicaSetUID returns an attribute KeyValue conforming to the
  4451. // "k8s.replicaset.uid" semantic conventions. It represents the UID of the
  4452. // ReplicaSet.
  4453. func K8SReplicaSetUID(val string) attribute.KeyValue {
  4454. return K8SReplicaSetUIDKey.String(val)
  4455. }
  4456. // K8SStatefulSetName returns an attribute KeyValue conforming to the
  4457. // "k8s.statefulset.name" semantic conventions. It represents the name of the
  4458. // StatefulSet.
  4459. func K8SStatefulSetName(val string) attribute.KeyValue {
  4460. return K8SStatefulSetNameKey.String(val)
  4461. }
  4462. // K8SStatefulSetUID returns an attribute KeyValue conforming to the
  4463. // "k8s.statefulset.uid" semantic conventions. It represents the UID of the
  4464. // StatefulSet.
  4465. func K8SStatefulSetUID(val string) attribute.KeyValue {
  4466. return K8SStatefulSetUIDKey.String(val)
  4467. }
  4468. // Log attributes
  4469. const (
  4470. // LogIostreamKey is the attribute Key conforming to the "log.iostream"
  4471. // semantic conventions. It represents the stream associated with the log.
  4472. // See below for a list of well-known values.
  4473. //
  4474. // Type: Enum
  4475. // RequirementLevel: Optional
  4476. // Stability: experimental
  4477. LogIostreamKey = attribute.Key("log.iostream")
  4478. )
  4479. var (
  4480. // Logs from stdout stream
  4481. LogIostreamStdout = LogIostreamKey.String("stdout")
  4482. // Events from stderr stream
  4483. LogIostreamStderr = LogIostreamKey.String("stderr")
  4484. )
  4485. // Attributes for a file to which log was emitted.
  4486. const (
  4487. // LogFileNameKey is the attribute Key conforming to the "log.file.name"
  4488. // semantic conventions. It represents the basename of the file.
  4489. //
  4490. // Type: string
  4491. // RequirementLevel: Optional
  4492. // Stability: experimental
  4493. // Examples: 'audit.log'
  4494. LogFileNameKey = attribute.Key("log.file.name")
  4495. // LogFileNameResolvedKey is the attribute Key conforming to the
  4496. // "log.file.name_resolved" semantic conventions. It represents the
  4497. // basename of the file, with symlinks resolved.
  4498. //
  4499. // Type: string
  4500. // RequirementLevel: Optional
  4501. // Stability: experimental
  4502. // Examples: 'uuid.log'
  4503. LogFileNameResolvedKey = attribute.Key("log.file.name_resolved")
  4504. // LogFilePathKey is the attribute Key conforming to the "log.file.path"
  4505. // semantic conventions. It represents the full path to the file.
  4506. //
  4507. // Type: string
  4508. // RequirementLevel: Optional
  4509. // Stability: experimental
  4510. // Examples: '/var/log/mysql/audit.log'
  4511. LogFilePathKey = attribute.Key("log.file.path")
  4512. // LogFilePathResolvedKey is the attribute Key conforming to the
  4513. // "log.file.path_resolved" semantic conventions. It represents the full
  4514. // path to the file, with symlinks resolved.
  4515. //
  4516. // Type: string
  4517. // RequirementLevel: Optional
  4518. // Stability: experimental
  4519. // Examples: '/var/lib/docker/uuid.log'
  4520. LogFilePathResolvedKey = attribute.Key("log.file.path_resolved")
  4521. )
  4522. // LogFileName returns an attribute KeyValue conforming to the
  4523. // "log.file.name" semantic conventions. It represents the basename of the
  4524. // file.
  4525. func LogFileName(val string) attribute.KeyValue {
  4526. return LogFileNameKey.String(val)
  4527. }
  4528. // LogFileNameResolved returns an attribute KeyValue conforming to the
  4529. // "log.file.name_resolved" semantic conventions. It represents the basename of
  4530. // the file, with symlinks resolved.
  4531. func LogFileNameResolved(val string) attribute.KeyValue {
  4532. return LogFileNameResolvedKey.String(val)
  4533. }
  4534. // LogFilePath returns an attribute KeyValue conforming to the
  4535. // "log.file.path" semantic conventions. It represents the full path to the
  4536. // file.
  4537. func LogFilePath(val string) attribute.KeyValue {
  4538. return LogFilePathKey.String(val)
  4539. }
  4540. // LogFilePathResolved returns an attribute KeyValue conforming to the
  4541. // "log.file.path_resolved" semantic conventions. It represents the full path
  4542. // to the file, with symlinks resolved.
  4543. func LogFilePathResolved(val string) attribute.KeyValue {
  4544. return LogFilePathResolvedKey.String(val)
  4545. }
  4546. // The generic attributes that may be used in any Log Record.
  4547. const (
  4548. // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid"
  4549. // semantic conventions. It represents a unique identifier for the Log
  4550. // Record.
  4551. //
  4552. // Type: string
  4553. // RequirementLevel: Optional
  4554. // Stability: experimental
  4555. // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV'
  4556. // Note: If an id is provided, other log records with the same id will be
  4557. // considered duplicates and can be removed safely. This means, that two
  4558. // distinguishable log records MUST have different values.
  4559. // The id MAY be an [Universally Unique Lexicographically Sortable
  4560. // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers
  4561. // (e.g. UUID) may be used as needed.
  4562. LogRecordUIDKey = attribute.Key("log.record.uid")
  4563. )
  4564. // LogRecordUID returns an attribute KeyValue conforming to the
  4565. // "log.record.uid" semantic conventions. It represents a unique identifier for
  4566. // the Log Record.
  4567. func LogRecordUID(val string) attribute.KeyValue {
  4568. return LogRecordUIDKey.String(val)
  4569. }
  4570. // Attributes describing telemetry around messaging systems and messaging
  4571. // activities.
  4572. const (
  4573. // MessagingBatchMessageCountKey is the attribute Key conforming to the
  4574. // "messaging.batch.message_count" semantic conventions. It represents the
  4575. // number of messages sent, received, or processed in the scope of the
  4576. // batching operation.
  4577. //
  4578. // Type: int
  4579. // RequirementLevel: Optional
  4580. // Stability: experimental
  4581. // Examples: 0, 1, 2
  4582. // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on
  4583. // spans that operate with a single message. When a messaging client
  4584. // library supports both batch and single-message API for the same
  4585. // operation, instrumentations SHOULD use `messaging.batch.message_count`
  4586. // for batching APIs and SHOULD NOT use it for single-message APIs.
  4587. MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count")
  4588. // MessagingClientIDKey is the attribute Key conforming to the
  4589. // "messaging.client.id" semantic conventions. It represents a unique
  4590. // identifier for the client that consumes or produces a message.
  4591. //
  4592. // Type: string
  4593. // RequirementLevel: Optional
  4594. // Stability: experimental
  4595. // Examples: 'client-5', 'myhost@8742@s8083jm'
  4596. MessagingClientIDKey = attribute.Key("messaging.client.id")
  4597. // MessagingDestinationAnonymousKey is the attribute Key conforming to the
  4598. // "messaging.destination.anonymous" semantic conventions. It represents a
  4599. // boolean that is true if the message destination is anonymous (could be
  4600. // unnamed or have auto-generated name).
  4601. //
  4602. // Type: boolean
  4603. // RequirementLevel: Optional
  4604. // Stability: experimental
  4605. MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous")
  4606. // MessagingDestinationNameKey is the attribute Key conforming to the
  4607. // "messaging.destination.name" semantic conventions. It represents the
  4608. // message destination name
  4609. //
  4610. // Type: string
  4611. // RequirementLevel: Optional
  4612. // Stability: experimental
  4613. // Examples: 'MyQueue', 'MyTopic'
  4614. // Note: Destination name SHOULD uniquely identify a specific queue, topic
  4615. // or other entity within the broker. If
  4616. // the broker doesn't have such notion, the destination name SHOULD
  4617. // uniquely identify the broker.
  4618. MessagingDestinationNameKey = attribute.Key("messaging.destination.name")
  4619. // MessagingDestinationPartitionIDKey is the attribute Key conforming to
  4620. // the "messaging.destination.partition.id" semantic conventions. It
  4621. // represents the identifier of the partition messages are sent to or
  4622. // received from, unique within the `messaging.destination.name`.
  4623. //
  4624. // Type: string
  4625. // RequirementLevel: Optional
  4626. // Stability: experimental
  4627. // Examples: '1'
  4628. MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id")
  4629. // MessagingDestinationTemplateKey is the attribute Key conforming to the
  4630. // "messaging.destination.template" semantic conventions. It represents the
  4631. // low cardinality representation of the messaging destination name
  4632. //
  4633. // Type: string
  4634. // RequirementLevel: Optional
  4635. // Stability: experimental
  4636. // Examples: '/customers/{customerID}'
  4637. // Note: Destination names could be constructed from templates. An example
  4638. // would be a destination name involving a user name or product id.
  4639. // Although the destination name in this case is of high cardinality, the
  4640. // underlying template is of low cardinality and can be effectively used
  4641. // for grouping and aggregation.
  4642. MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template")
  4643. // MessagingDestinationTemporaryKey is the attribute Key conforming to the
  4644. // "messaging.destination.temporary" semantic conventions. It represents a
  4645. // boolean that is true if the message destination is temporary and might
  4646. // not exist anymore after messages are processed.
  4647. //
  4648. // Type: boolean
  4649. // RequirementLevel: Optional
  4650. // Stability: experimental
  4651. MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary")
  4652. // MessagingDestinationPublishAnonymousKey is the attribute Key conforming
  4653. // to the "messaging.destination_publish.anonymous" semantic conventions.
  4654. // It represents a boolean that is true if the publish message destination
  4655. // is anonymous (could be unnamed or have auto-generated name).
  4656. //
  4657. // Type: boolean
  4658. // RequirementLevel: Optional
  4659. // Stability: experimental
  4660. MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous")
  4661. // MessagingDestinationPublishNameKey is the attribute Key conforming to
  4662. // the "messaging.destination_publish.name" semantic conventions. It
  4663. // represents the name of the original destination the message was
  4664. // published to
  4665. //
  4666. // Type: string
  4667. // RequirementLevel: Optional
  4668. // Stability: experimental
  4669. // Examples: 'MyQueue', 'MyTopic'
  4670. // Note: The name SHOULD uniquely identify a specific queue, topic, or
  4671. // other entity within the broker. If
  4672. // the broker doesn't have such notion, the original destination name
  4673. // SHOULD uniquely identify the broker.
  4674. MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name")
  4675. // MessagingMessageBodySizeKey is the attribute Key conforming to the
  4676. // "messaging.message.body.size" semantic conventions. It represents the
  4677. // size of the message body in bytes.
  4678. //
  4679. // Type: int
  4680. // RequirementLevel: Optional
  4681. // Stability: experimental
  4682. // Examples: 1439
  4683. // Note: This can refer to both the compressed or uncompressed body size.
  4684. // If both sizes are known, the uncompressed
  4685. // body size should be used.
  4686. MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size")
  4687. // MessagingMessageConversationIDKey is the attribute Key conforming to the
  4688. // "messaging.message.conversation_id" semantic conventions. It represents
  4689. // the conversation ID identifying the conversation to which the message
  4690. // belongs, represented as a string. Sometimes called "Correlation ID".
  4691. //
  4692. // Type: string
  4693. // RequirementLevel: Optional
  4694. // Stability: experimental
  4695. // Examples: 'MyConversationID'
  4696. MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id")
  4697. // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the
  4698. // "messaging.message.envelope.size" semantic conventions. It represents
  4699. // the size of the message body and metadata in bytes.
  4700. //
  4701. // Type: int
  4702. // RequirementLevel: Optional
  4703. // Stability: experimental
  4704. // Examples: 2738
  4705. // Note: This can refer to both the compressed or uncompressed size. If
  4706. // both sizes are known, the uncompressed
  4707. // size should be used.
  4708. MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size")
  4709. // MessagingMessageIDKey is the attribute Key conforming to the
  4710. // "messaging.message.id" semantic conventions. It represents a value used
  4711. // by the messaging system as an identifier for the message, represented as
  4712. // a string.
  4713. //
  4714. // Type: string
  4715. // RequirementLevel: Optional
  4716. // Stability: experimental
  4717. // Examples: '452a7c7c7c7048c2f887f61572b18fc2'
  4718. MessagingMessageIDKey = attribute.Key("messaging.message.id")
  4719. // MessagingOperationNameKey is the attribute Key conforming to the
  4720. // "messaging.operation.name" semantic conventions. It represents the
  4721. // system-specific name of the messaging operation.
  4722. //
  4723. // Type: string
  4724. // RequirementLevel: Optional
  4725. // Stability: experimental
  4726. // Examples: 'ack', 'nack', 'send'
  4727. MessagingOperationNameKey = attribute.Key("messaging.operation.name")
  4728. // MessagingOperationTypeKey is the attribute Key conforming to the
  4729. // "messaging.operation.type" semantic conventions. It represents a string
  4730. // identifying the type of the messaging operation.
  4731. //
  4732. // Type: Enum
  4733. // RequirementLevel: Optional
  4734. // Stability: experimental
  4735. // Note: If a custom value is used, it MUST be of low cardinality.
  4736. MessagingOperationTypeKey = attribute.Key("messaging.operation.type")
  4737. // MessagingSystemKey is the attribute Key conforming to the
  4738. // "messaging.system" semantic conventions. It represents the messaging
  4739. // system as identified by the client instrumentation.
  4740. //
  4741. // Type: Enum
  4742. // RequirementLevel: Optional
  4743. // Stability: experimental
  4744. // Note: The actual messaging system may differ from the one known by the
  4745. // client. For example, when using Kafka client libraries to communicate
  4746. // with Azure Event Hubs, the `messaging.system` is set to `kafka` based on
  4747. // the instrumentation's best knowledge.
  4748. MessagingSystemKey = attribute.Key("messaging.system")
  4749. )
  4750. var (
  4751. // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created
  4752. MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish")
  4753. // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios
  4754. MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create")
  4755. // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages
  4756. MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive")
  4757. // One or more messages are delivered to or processed by a consumer
  4758. MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("process")
  4759. // One or more messages are settled
  4760. MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle")
  4761. )
  4762. var (
  4763. // Apache ActiveMQ
  4764. MessagingSystemActivemq = MessagingSystemKey.String("activemq")
  4765. // Amazon Simple Queue Service (SQS)
  4766. MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs")
  4767. // Azure Event Grid
  4768. MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid")
  4769. // Azure Event Hubs
  4770. MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs")
  4771. // Azure Service Bus
  4772. MessagingSystemServicebus = MessagingSystemKey.String("servicebus")
  4773. // Google Cloud Pub/Sub
  4774. MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub")
  4775. // Java Message Service
  4776. MessagingSystemJms = MessagingSystemKey.String("jms")
  4777. // Apache Kafka
  4778. MessagingSystemKafka = MessagingSystemKey.String("kafka")
  4779. // RabbitMQ
  4780. MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq")
  4781. // Apache RocketMQ
  4782. MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq")
  4783. )
  4784. // MessagingBatchMessageCount returns an attribute KeyValue conforming to
  4785. // the "messaging.batch.message_count" semantic conventions. It represents the
  4786. // number of messages sent, received, or processed in the scope of the batching
  4787. // operation.
  4788. func MessagingBatchMessageCount(val int) attribute.KeyValue {
  4789. return MessagingBatchMessageCountKey.Int(val)
  4790. }
  4791. // MessagingClientID returns an attribute KeyValue conforming to the
  4792. // "messaging.client.id" semantic conventions. It represents a unique
  4793. // identifier for the client that consumes or produces a message.
  4794. func MessagingClientID(val string) attribute.KeyValue {
  4795. return MessagingClientIDKey.String(val)
  4796. }
  4797. // MessagingDestinationAnonymous returns an attribute KeyValue conforming to
  4798. // the "messaging.destination.anonymous" semantic conventions. It represents a
  4799. // boolean that is true if the message destination is anonymous (could be
  4800. // unnamed or have auto-generated name).
  4801. func MessagingDestinationAnonymous(val bool) attribute.KeyValue {
  4802. return MessagingDestinationAnonymousKey.Bool(val)
  4803. }
  4804. // MessagingDestinationName returns an attribute KeyValue conforming to the
  4805. // "messaging.destination.name" semantic conventions. It represents the message
  4806. // destination name
  4807. func MessagingDestinationName(val string) attribute.KeyValue {
  4808. return MessagingDestinationNameKey.String(val)
  4809. }
  4810. // MessagingDestinationPartitionID returns an attribute KeyValue conforming
  4811. // to the "messaging.destination.partition.id" semantic conventions. It
  4812. // represents the identifier of the partition messages are sent to or received
  4813. // from, unique within the `messaging.destination.name`.
  4814. func MessagingDestinationPartitionID(val string) attribute.KeyValue {
  4815. return MessagingDestinationPartitionIDKey.String(val)
  4816. }
  4817. // MessagingDestinationTemplate returns an attribute KeyValue conforming to
  4818. // the "messaging.destination.template" semantic conventions. It represents the
  4819. // low cardinality representation of the messaging destination name
  4820. func MessagingDestinationTemplate(val string) attribute.KeyValue {
  4821. return MessagingDestinationTemplateKey.String(val)
  4822. }
  4823. // MessagingDestinationTemporary returns an attribute KeyValue conforming to
  4824. // the "messaging.destination.temporary" semantic conventions. It represents a
  4825. // boolean that is true if the message destination is temporary and might not
  4826. // exist anymore after messages are processed.
  4827. func MessagingDestinationTemporary(val bool) attribute.KeyValue {
  4828. return MessagingDestinationTemporaryKey.Bool(val)
  4829. }
  4830. // MessagingDestinationPublishAnonymous returns an attribute KeyValue
  4831. // conforming to the "messaging.destination_publish.anonymous" semantic
  4832. // conventions. It represents a boolean that is true if the publish message
  4833. // destination is anonymous (could be unnamed or have auto-generated name).
  4834. func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue {
  4835. return MessagingDestinationPublishAnonymousKey.Bool(val)
  4836. }
  4837. // MessagingDestinationPublishName returns an attribute KeyValue conforming
  4838. // to the "messaging.destination_publish.name" semantic conventions. It
  4839. // represents the name of the original destination the message was published to
  4840. func MessagingDestinationPublishName(val string) attribute.KeyValue {
  4841. return MessagingDestinationPublishNameKey.String(val)
  4842. }
  4843. // MessagingMessageBodySize returns an attribute KeyValue conforming to the
  4844. // "messaging.message.body.size" semantic conventions. It represents the size
  4845. // of the message body in bytes.
  4846. func MessagingMessageBodySize(val int) attribute.KeyValue {
  4847. return MessagingMessageBodySizeKey.Int(val)
  4848. }
  4849. // MessagingMessageConversationID returns an attribute KeyValue conforming
  4850. // to the "messaging.message.conversation_id" semantic conventions. It
  4851. // represents the conversation ID identifying the conversation to which the
  4852. // message belongs, represented as a string. Sometimes called "Correlation ID".
  4853. func MessagingMessageConversationID(val string) attribute.KeyValue {
  4854. return MessagingMessageConversationIDKey.String(val)
  4855. }
  4856. // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to
  4857. // the "messaging.message.envelope.size" semantic conventions. It represents
  4858. // the size of the message body and metadata in bytes.
  4859. func MessagingMessageEnvelopeSize(val int) attribute.KeyValue {
  4860. return MessagingMessageEnvelopeSizeKey.Int(val)
  4861. }
  4862. // MessagingMessageID returns an attribute KeyValue conforming to the
  4863. // "messaging.message.id" semantic conventions. It represents a value used by
  4864. // the messaging system as an identifier for the message, represented as a
  4865. // string.
  4866. func MessagingMessageID(val string) attribute.KeyValue {
  4867. return MessagingMessageIDKey.String(val)
  4868. }
  4869. // MessagingOperationName returns an attribute KeyValue conforming to the
  4870. // "messaging.operation.name" semantic conventions. It represents the
  4871. // system-specific name of the messaging operation.
  4872. func MessagingOperationName(val string) attribute.KeyValue {
  4873. return MessagingOperationNameKey.String(val)
  4874. }
  4875. // This group describes attributes specific to Apache Kafka.
  4876. const (
  4877. // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the
  4878. // "messaging.kafka.consumer.group" semantic conventions. It represents the
  4879. // name of the Kafka Consumer Group that is handling the message. Only
  4880. // applies to consumers, not producers.
  4881. //
  4882. // Type: string
  4883. // RequirementLevel: Optional
  4884. // Stability: experimental
  4885. // Examples: 'my-group'
  4886. MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group")
  4887. // MessagingKafkaMessageKeyKey is the attribute Key conforming to the
  4888. // "messaging.kafka.message.key" semantic conventions. It represents the
  4889. // message keys in Kafka are used for grouping alike messages to ensure
  4890. // they're processed on the same partition. They differ from
  4891. // `messaging.message.id` in that they're not unique. If the key is `null`,
  4892. // the attribute MUST NOT be set.
  4893. //
  4894. // Type: string
  4895. // RequirementLevel: Optional
  4896. // Stability: experimental
  4897. // Examples: 'myKey'
  4898. // Note: If the key type is not string, it's string representation has to
  4899. // be supplied for the attribute. If the key has no unambiguous, canonical
  4900. // string form, don't include its value.
  4901. MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key")
  4902. // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the
  4903. // "messaging.kafka.message.offset" semantic conventions. It represents the
  4904. // offset of a record in the corresponding Kafka partition.
  4905. //
  4906. // Type: int
  4907. // RequirementLevel: Optional
  4908. // Stability: experimental
  4909. // Examples: 42
  4910. MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset")
  4911. // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the
  4912. // "messaging.kafka.message.tombstone" semantic conventions. It represents
  4913. // a boolean that is true if the message is a tombstone.
  4914. //
  4915. // Type: boolean
  4916. // RequirementLevel: Optional
  4917. // Stability: experimental
  4918. MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone")
  4919. )
  4920. // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to
  4921. // the "messaging.kafka.consumer.group" semantic conventions. It represents the
  4922. // name of the Kafka Consumer Group that is handling the message. Only applies
  4923. // to consumers, not producers.
  4924. func MessagingKafkaConsumerGroup(val string) attribute.KeyValue {
  4925. return MessagingKafkaConsumerGroupKey.String(val)
  4926. }
  4927. // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the
  4928. // "messaging.kafka.message.key" semantic conventions. It represents the
  4929. // message keys in Kafka are used for grouping alike messages to ensure they're
  4930. // processed on the same partition. They differ from `messaging.message.id` in
  4931. // that they're not unique. If the key is `null`, the attribute MUST NOT be
  4932. // set.
  4933. func MessagingKafkaMessageKey(val string) attribute.KeyValue {
  4934. return MessagingKafkaMessageKeyKey.String(val)
  4935. }
  4936. // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to
  4937. // the "messaging.kafka.message.offset" semantic conventions. It represents the
  4938. // offset of a record in the corresponding Kafka partition.
  4939. func MessagingKafkaMessageOffset(val int) attribute.KeyValue {
  4940. return MessagingKafkaMessageOffsetKey.Int(val)
  4941. }
  4942. // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming
  4943. // to the "messaging.kafka.message.tombstone" semantic conventions. It
  4944. // represents a boolean that is true if the message is a tombstone.
  4945. func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue {
  4946. return MessagingKafkaMessageTombstoneKey.Bool(val)
  4947. }
  4948. // This group describes attributes specific to RabbitMQ.
  4949. const (
  4950. // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key
  4951. // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
  4952. // conventions. It represents the rabbitMQ message routing key.
  4953. //
  4954. // Type: string
  4955. // RequirementLevel: Optional
  4956. // Stability: experimental
  4957. // Examples: 'myKey'
  4958. MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key")
  4959. // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming
  4960. // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions.
  4961. // It represents the rabbitMQ message delivery tag
  4962. //
  4963. // Type: int
  4964. // RequirementLevel: Optional
  4965. // Stability: experimental
  4966. // Examples: 123
  4967. MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag")
  4968. )
  4969. // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue
  4970. // conforming to the "messaging.rabbitmq.destination.routing_key" semantic
  4971. // conventions. It represents the rabbitMQ message routing key.
  4972. func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue {
  4973. return MessagingRabbitmqDestinationRoutingKeyKey.String(val)
  4974. }
  4975. // MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue
  4976. // conforming to the "messaging.rabbitmq.message.delivery_tag" semantic
  4977. // conventions. It represents the rabbitMQ message delivery tag
  4978. func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue {
  4979. return MessagingRabbitmqMessageDeliveryTagKey.Int(val)
  4980. }
  4981. // This group describes attributes specific to RocketMQ.
  4982. const (
  4983. // MessagingRocketmqClientGroupKey is the attribute Key conforming to the
  4984. // "messaging.rocketmq.client_group" semantic conventions. It represents
  4985. // the name of the RocketMQ producer/consumer group that is handling the
  4986. // message. The client type is identified by the SpanKind.
  4987. //
  4988. // Type: string
  4989. // RequirementLevel: Optional
  4990. // Stability: experimental
  4991. // Examples: 'myConsumerGroup'
  4992. MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group")
  4993. // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to
  4994. // the "messaging.rocketmq.consumption_model" semantic conventions. It
  4995. // represents the model of message consumption. This only applies to
  4996. // consumer spans.
  4997. //
  4998. // Type: Enum
  4999. // RequirementLevel: Optional
  5000. // Stability: experimental
  5001. MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model")
  5002. // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key
  5003. // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
  5004. // conventions. It represents the delay time level for delay message, which
  5005. // determines the message delay time.
  5006. //
  5007. // Type: int
  5008. // RequirementLevel: Optional
  5009. // Stability: experimental
  5010. // Examples: 3
  5011. MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level")
  5012. // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key
  5013. // conforming to the "messaging.rocketmq.message.delivery_timestamp"
  5014. // semantic conventions. It represents the timestamp in milliseconds that
  5015. // the delay message is expected to be delivered to consumer.
  5016. //
  5017. // Type: int
  5018. // RequirementLevel: Optional
  5019. // Stability: experimental
  5020. // Examples: 1665987217045
  5021. MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp")
  5022. // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the
  5023. // "messaging.rocketmq.message.group" semantic conventions. It represents
  5024. // the it is essential for FIFO message. Messages that belong to the same
  5025. // message group are always processed one by one within the same consumer
  5026. // group.
  5027. //
  5028. // Type: string
  5029. // RequirementLevel: Optional
  5030. // Stability: experimental
  5031. // Examples: 'myMessageGroup'
  5032. MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group")
  5033. // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the
  5034. // "messaging.rocketmq.message.keys" semantic conventions. It represents
  5035. // the key(s) of message, another way to mark message besides message id.
  5036. //
  5037. // Type: string[]
  5038. // RequirementLevel: Optional
  5039. // Stability: experimental
  5040. // Examples: 'keyA', 'keyB'
  5041. MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys")
  5042. // MessagingRocketmqMessageTagKey is the attribute Key conforming to the
  5043. // "messaging.rocketmq.message.tag" semantic conventions. It represents the
  5044. // secondary classifier of message besides topic.
  5045. //
  5046. // Type: string
  5047. // RequirementLevel: Optional
  5048. // Stability: experimental
  5049. // Examples: 'tagA'
  5050. MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag")
  5051. // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the
  5052. // "messaging.rocketmq.message.type" semantic conventions. It represents
  5053. // the type of message.
  5054. //
  5055. // Type: Enum
  5056. // RequirementLevel: Optional
  5057. // Stability: experimental
  5058. MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type")
  5059. // MessagingRocketmqNamespaceKey is the attribute Key conforming to the
  5060. // "messaging.rocketmq.namespace" semantic conventions. It represents the
  5061. // namespace of RocketMQ resources, resources in different namespaces are
  5062. // individual.
  5063. //
  5064. // Type: string
  5065. // RequirementLevel: Optional
  5066. // Stability: experimental
  5067. // Examples: 'myNamespace'
  5068. MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace")
  5069. )
  5070. var (
  5071. // Clustering consumption model
  5072. MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering")
  5073. // Broadcasting consumption model
  5074. MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting")
  5075. )
  5076. var (
  5077. // Normal message
  5078. MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal")
  5079. // FIFO message
  5080. MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo")
  5081. // Delay message
  5082. MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay")
  5083. // Transaction message
  5084. MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction")
  5085. )
  5086. // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to
  5087. // the "messaging.rocketmq.client_group" semantic conventions. It represents
  5088. // the name of the RocketMQ producer/consumer group that is handling the
  5089. // message. The client type is identified by the SpanKind.
  5090. func MessagingRocketmqClientGroup(val string) attribute.KeyValue {
  5091. return MessagingRocketmqClientGroupKey.String(val)
  5092. }
  5093. // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue
  5094. // conforming to the "messaging.rocketmq.message.delay_time_level" semantic
  5095. // conventions. It represents the delay time level for delay message, which
  5096. // determines the message delay time.
  5097. func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue {
  5098. return MessagingRocketmqMessageDelayTimeLevelKey.Int(val)
  5099. }
  5100. // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue
  5101. // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic
  5102. // conventions. It represents the timestamp in milliseconds that the delay
  5103. // message is expected to be delivered to consumer.
  5104. func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue {
  5105. return MessagingRocketmqMessageDeliveryTimestampKey.Int(val)
  5106. }
  5107. // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to
  5108. // the "messaging.rocketmq.message.group" semantic conventions. It represents
  5109. // the it is essential for FIFO message. Messages that belong to the same
  5110. // message group are always processed one by one within the same consumer
  5111. // group.
  5112. func MessagingRocketmqMessageGroup(val string) attribute.KeyValue {
  5113. return MessagingRocketmqMessageGroupKey.String(val)
  5114. }
  5115. // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to
  5116. // the "messaging.rocketmq.message.keys" semantic conventions. It represents
  5117. // the key(s) of message, another way to mark message besides message id.
  5118. func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue {
  5119. return MessagingRocketmqMessageKeysKey.StringSlice(val)
  5120. }
  5121. // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to
  5122. // the "messaging.rocketmq.message.tag" semantic conventions. It represents the
  5123. // secondary classifier of message besides topic.
  5124. func MessagingRocketmqMessageTag(val string) attribute.KeyValue {
  5125. return MessagingRocketmqMessageTagKey.String(val)
  5126. }
  5127. // MessagingRocketmqNamespace returns an attribute KeyValue conforming to
  5128. // the "messaging.rocketmq.namespace" semantic conventions. It represents the
  5129. // namespace of RocketMQ resources, resources in different namespaces are
  5130. // individual.
  5131. func MessagingRocketmqNamespace(val string) attribute.KeyValue {
  5132. return MessagingRocketmqNamespaceKey.String(val)
  5133. }
  5134. // This group describes attributes specific to GCP Pub/Sub.
  5135. const (
  5136. // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming
  5137. // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions.
  5138. // It represents the ack deadline in seconds set for the modify ack
  5139. // deadline request.
  5140. //
  5141. // Type: int
  5142. // RequirementLevel: Optional
  5143. // Stability: experimental
  5144. // Examples: 10
  5145. MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline")
  5146. // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the
  5147. // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
  5148. // represents the ack id for a given message.
  5149. //
  5150. // Type: string
  5151. // RequirementLevel: Optional
  5152. // Stability: experimental
  5153. // Examples: 'ack_id'
  5154. MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id")
  5155. // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key
  5156. // conforming to the "messaging.gcp_pubsub.message.delivery_attempt"
  5157. // semantic conventions. It represents the delivery attempt for a given
  5158. // message.
  5159. //
  5160. // Type: int
  5161. // RequirementLevel: Optional
  5162. // Stability: experimental
  5163. // Examples: 2
  5164. MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt")
  5165. // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming
  5166. // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions.
  5167. // It represents the ordering key for a given message. If the attribute is
  5168. // not present, the message does not have an ordering key.
  5169. //
  5170. // Type: string
  5171. // RequirementLevel: Optional
  5172. // Stability: experimental
  5173. // Examples: 'ordering_key'
  5174. MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key")
  5175. )
  5176. // MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue
  5177. // conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic
  5178. // conventions. It represents the ack deadline in seconds set for the modify
  5179. // ack deadline request.
  5180. func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue {
  5181. return MessagingGCPPubsubMessageAckDeadlineKey.Int(val)
  5182. }
  5183. // MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming
  5184. // to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It
  5185. // represents the ack id for a given message.
  5186. func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue {
  5187. return MessagingGCPPubsubMessageAckIDKey.String(val)
  5188. }
  5189. // MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue
  5190. // conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic
  5191. // conventions. It represents the delivery attempt for a given message.
  5192. func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue {
  5193. return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val)
  5194. }
  5195. // MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue
  5196. // conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic
  5197. // conventions. It represents the ordering key for a given message. If the
  5198. // attribute is not present, the message does not have an ordering key.
  5199. func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue {
  5200. return MessagingGCPPubsubMessageOrderingKeyKey.String(val)
  5201. }
  5202. // This group describes attributes specific to Azure Service Bus.
  5203. const (
  5204. // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key
  5205. // conforming to the "messaging.servicebus.destination.subscription_name"
  5206. // semantic conventions. It represents the name of the subscription in the
  5207. // topic messages are received from.
  5208. //
  5209. // Type: string
  5210. // RequirementLevel: Optional
  5211. // Stability: experimental
  5212. // Examples: 'mySubscription'
  5213. MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name")
  5214. // MessagingServicebusDispositionStatusKey is the attribute Key conforming
  5215. // to the "messaging.servicebus.disposition_status" semantic conventions.
  5216. // It represents the describes the [settlement
  5217. // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock).
  5218. //
  5219. // Type: Enum
  5220. // RequirementLevel: Optional
  5221. // Stability: experimental
  5222. MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status")
  5223. // MessagingServicebusMessageDeliveryCountKey is the attribute Key
  5224. // conforming to the "messaging.servicebus.message.delivery_count" semantic
  5225. // conventions. It represents the number of deliveries that have been
  5226. // attempted for this message.
  5227. //
  5228. // Type: int
  5229. // RequirementLevel: Optional
  5230. // Stability: experimental
  5231. // Examples: 2
  5232. MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count")
  5233. // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key
  5234. // conforming to the "messaging.servicebus.message.enqueued_time" semantic
  5235. // conventions. It represents the UTC epoch seconds at which the message
  5236. // has been accepted and stored in the entity.
  5237. //
  5238. // Type: int
  5239. // RequirementLevel: Optional
  5240. // Stability: experimental
  5241. // Examples: 1701393730
  5242. MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time")
  5243. )
  5244. var (
  5245. // Message is completed
  5246. MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete")
  5247. // Message is abandoned
  5248. MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon")
  5249. // Message is sent to dead letter queue
  5250. MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter")
  5251. // Message is deferred
  5252. MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer")
  5253. )
  5254. // MessagingServicebusDestinationSubscriptionName returns an attribute
  5255. // KeyValue conforming to the
  5256. // "messaging.servicebus.destination.subscription_name" semantic conventions.
  5257. // It represents the name of the subscription in the topic messages are
  5258. // received from.
  5259. func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue {
  5260. return MessagingServicebusDestinationSubscriptionNameKey.String(val)
  5261. }
  5262. // MessagingServicebusMessageDeliveryCount returns an attribute KeyValue
  5263. // conforming to the "messaging.servicebus.message.delivery_count" semantic
  5264. // conventions. It represents the number of deliveries that have been attempted
  5265. // for this message.
  5266. func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue {
  5267. return MessagingServicebusMessageDeliveryCountKey.Int(val)
  5268. }
  5269. // MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue
  5270. // conforming to the "messaging.servicebus.message.enqueued_time" semantic
  5271. // conventions. It represents the UTC epoch seconds at which the message has
  5272. // been accepted and stored in the entity.
  5273. func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue {
  5274. return MessagingServicebusMessageEnqueuedTimeKey.Int(val)
  5275. }
  5276. // This group describes attributes specific to Azure Event Hubs.
  5277. const (
  5278. // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to
  5279. // the "messaging.eventhubs.consumer.group" semantic conventions. It
  5280. // represents the name of the consumer group the event consumer is
  5281. // associated with.
  5282. //
  5283. // Type: string
  5284. // RequirementLevel: Optional
  5285. // Stability: experimental
  5286. // Examples: 'indexer'
  5287. MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group")
  5288. // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming
  5289. // to the "messaging.eventhubs.message.enqueued_time" semantic conventions.
  5290. // It represents the UTC epoch seconds at which the message has been
  5291. // accepted and stored in the entity.
  5292. //
  5293. // Type: int
  5294. // RequirementLevel: Optional
  5295. // Stability: experimental
  5296. // Examples: 1701393730
  5297. MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time")
  5298. )
  5299. // MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming
  5300. // to the "messaging.eventhubs.consumer.group" semantic conventions. It
  5301. // represents the name of the consumer group the event consumer is associated
  5302. // with.
  5303. func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue {
  5304. return MessagingEventhubsConsumerGroupKey.String(val)
  5305. }
  5306. // MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue
  5307. // conforming to the "messaging.eventhubs.message.enqueued_time" semantic
  5308. // conventions. It represents the UTC epoch seconds at which the message has
  5309. // been accepted and stored in the entity.
  5310. func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue {
  5311. return MessagingEventhubsMessageEnqueuedTimeKey.Int(val)
  5312. }
  5313. // These attributes may be used for any network related operation.
  5314. const (
  5315. // NetworkCarrierIccKey is the attribute Key conforming to the
  5316. // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
  5317. // alpha-2 2-character country code associated with the mobile carrier
  5318. // network.
  5319. //
  5320. // Type: string
  5321. // RequirementLevel: Optional
  5322. // Stability: experimental
  5323. // Examples: 'DE'
  5324. NetworkCarrierIccKey = attribute.Key("network.carrier.icc")
  5325. // NetworkCarrierMccKey is the attribute Key conforming to the
  5326. // "network.carrier.mcc" semantic conventions. It represents the mobile
  5327. // carrier country code.
  5328. //
  5329. // Type: string
  5330. // RequirementLevel: Optional
  5331. // Stability: experimental
  5332. // Examples: '310'
  5333. NetworkCarrierMccKey = attribute.Key("network.carrier.mcc")
  5334. // NetworkCarrierMncKey is the attribute Key conforming to the
  5335. // "network.carrier.mnc" semantic conventions. It represents the mobile
  5336. // carrier network code.
  5337. //
  5338. // Type: string
  5339. // RequirementLevel: Optional
  5340. // Stability: experimental
  5341. // Examples: '001'
  5342. NetworkCarrierMncKey = attribute.Key("network.carrier.mnc")
  5343. // NetworkCarrierNameKey is the attribute Key conforming to the
  5344. // "network.carrier.name" semantic conventions. It represents the name of
  5345. // the mobile carrier.
  5346. //
  5347. // Type: string
  5348. // RequirementLevel: Optional
  5349. // Stability: experimental
  5350. // Examples: 'sprint'
  5351. NetworkCarrierNameKey = attribute.Key("network.carrier.name")
  5352. // NetworkConnectionSubtypeKey is the attribute Key conforming to the
  5353. // "network.connection.subtype" semantic conventions. It represents the
  5354. // this describes more details regarding the connection.type. It may be the
  5355. // type of cell technology connection, but it could be used for describing
  5356. // details about a wifi connection.
  5357. //
  5358. // Type: Enum
  5359. // RequirementLevel: Optional
  5360. // Stability: experimental
  5361. // Examples: 'LTE'
  5362. NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype")
  5363. // NetworkConnectionTypeKey is the attribute Key conforming to the
  5364. // "network.connection.type" semantic conventions. It represents the
  5365. // internet connection type.
  5366. //
  5367. // Type: Enum
  5368. // RequirementLevel: Optional
  5369. // Stability: experimental
  5370. // Examples: 'wifi'
  5371. NetworkConnectionTypeKey = attribute.Key("network.connection.type")
  5372. // NetworkIoDirectionKey is the attribute Key conforming to the
  5373. // "network.io.direction" semantic conventions. It represents the network
  5374. // IO operation direction.
  5375. //
  5376. // Type: Enum
  5377. // RequirementLevel: Optional
  5378. // Stability: experimental
  5379. // Examples: 'transmit'
  5380. NetworkIoDirectionKey = attribute.Key("network.io.direction")
  5381. // NetworkLocalAddressKey is the attribute Key conforming to the
  5382. // "network.local.address" semantic conventions. It represents the local
  5383. // address of the network connection - IP address or Unix domain socket
  5384. // name.
  5385. //
  5386. // Type: string
  5387. // RequirementLevel: Optional
  5388. // Stability: stable
  5389. // Examples: '10.1.2.80', '/tmp/my.sock'
  5390. NetworkLocalAddressKey = attribute.Key("network.local.address")
  5391. // NetworkLocalPortKey is the attribute Key conforming to the
  5392. // "network.local.port" semantic conventions. It represents the local port
  5393. // number of the network connection.
  5394. //
  5395. // Type: int
  5396. // RequirementLevel: Optional
  5397. // Stability: stable
  5398. // Examples: 65123
  5399. NetworkLocalPortKey = attribute.Key("network.local.port")
  5400. // NetworkPeerAddressKey is the attribute Key conforming to the
  5401. // "network.peer.address" semantic conventions. It represents the peer
  5402. // address of the network connection - IP address or Unix domain socket
  5403. // name.
  5404. //
  5405. // Type: string
  5406. // RequirementLevel: Optional
  5407. // Stability: stable
  5408. // Examples: '10.1.2.80', '/tmp/my.sock'
  5409. NetworkPeerAddressKey = attribute.Key("network.peer.address")
  5410. // NetworkPeerPortKey is the attribute Key conforming to the
  5411. // "network.peer.port" semantic conventions. It represents the peer port
  5412. // number of the network connection.
  5413. //
  5414. // Type: int
  5415. // RequirementLevel: Optional
  5416. // Stability: stable
  5417. // Examples: 65123
  5418. NetworkPeerPortKey = attribute.Key("network.peer.port")
  5419. // NetworkProtocolNameKey is the attribute Key conforming to the
  5420. // "network.protocol.name" semantic conventions. It represents the [OSI
  5421. // application layer](https://osi-model.com/application-layer/) or non-OSI
  5422. // equivalent.
  5423. //
  5424. // Type: string
  5425. // RequirementLevel: Optional
  5426. // Stability: stable
  5427. // Examples: 'amqp', 'http', 'mqtt'
  5428. // Note: The value SHOULD be normalized to lowercase.
  5429. NetworkProtocolNameKey = attribute.Key("network.protocol.name")
  5430. // NetworkProtocolVersionKey is the attribute Key conforming to the
  5431. // "network.protocol.version" semantic conventions. It represents the
  5432. // actual version of the protocol used for network communication.
  5433. //
  5434. // Type: string
  5435. // RequirementLevel: Optional
  5436. // Stability: stable
  5437. // Examples: '1.1', '2'
  5438. // Note: If protocol version is subject to negotiation (for example using
  5439. // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute
  5440. // SHOULD be set to the negotiated version. If the actual protocol version
  5441. // is not known, this attribute SHOULD NOT be set.
  5442. NetworkProtocolVersionKey = attribute.Key("network.protocol.version")
  5443. // NetworkTransportKey is the attribute Key conforming to the
  5444. // "network.transport" semantic conventions. It represents the [OSI
  5445. // transport layer](https://osi-model.com/transport-layer/) or
  5446. // [inter-process communication
  5447. // method](https://wikipedia.org/wiki/Inter-process_communication).
  5448. //
  5449. // Type: Enum
  5450. // RequirementLevel: Optional
  5451. // Stability: stable
  5452. // Examples: 'tcp', 'udp'
  5453. // Note: The value SHOULD be normalized to lowercase.
  5454. //
  5455. // Consider always setting the transport when setting a port number, since
  5456. // a port number is ambiguous without knowing the transport. For example
  5457. // different processes could be listening on TCP port 12345 and UDP port
  5458. // 12345.
  5459. NetworkTransportKey = attribute.Key("network.transport")
  5460. // NetworkTypeKey is the attribute Key conforming to the "network.type"
  5461. // semantic conventions. It represents the [OSI network
  5462. // layer](https://osi-model.com/network-layer/) or non-OSI equivalent.
  5463. //
  5464. // Type: Enum
  5465. // RequirementLevel: Optional
  5466. // Stability: stable
  5467. // Examples: 'ipv4', 'ipv6'
  5468. // Note: The value SHOULD be normalized to lowercase.
  5469. NetworkTypeKey = attribute.Key("network.type")
  5470. )
  5471. var (
  5472. // GPRS
  5473. NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs")
  5474. // EDGE
  5475. NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge")
  5476. // UMTS
  5477. NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts")
  5478. // CDMA
  5479. NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma")
  5480. // EVDO Rel. 0
  5481. NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0")
  5482. // EVDO Rev. A
  5483. NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a")
  5484. // CDMA2000 1XRTT
  5485. NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt")
  5486. // HSDPA
  5487. NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa")
  5488. // HSUPA
  5489. NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa")
  5490. // HSPA
  5491. NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa")
  5492. // IDEN
  5493. NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden")
  5494. // EVDO Rev. B
  5495. NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b")
  5496. // LTE
  5497. NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte")
  5498. // EHRPD
  5499. NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd")
  5500. // HSPAP
  5501. NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap")
  5502. // GSM
  5503. NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm")
  5504. // TD-SCDMA
  5505. NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma")
  5506. // IWLAN
  5507. NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan")
  5508. // 5G NR (New Radio)
  5509. NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr")
  5510. // 5G NRNSA (New Radio Non-Standalone)
  5511. NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa")
  5512. // LTE CA
  5513. NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca")
  5514. )
  5515. var (
  5516. // wifi
  5517. NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi")
  5518. // wired
  5519. NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired")
  5520. // cell
  5521. NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell")
  5522. // unavailable
  5523. NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable")
  5524. // unknown
  5525. NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown")
  5526. )
  5527. var (
  5528. // transmit
  5529. NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit")
  5530. // receive
  5531. NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive")
  5532. )
  5533. var (
  5534. // TCP
  5535. NetworkTransportTCP = NetworkTransportKey.String("tcp")
  5536. // UDP
  5537. NetworkTransportUDP = NetworkTransportKey.String("udp")
  5538. // Named or anonymous pipe
  5539. NetworkTransportPipe = NetworkTransportKey.String("pipe")
  5540. // Unix domain socket
  5541. NetworkTransportUnix = NetworkTransportKey.String("unix")
  5542. )
  5543. var (
  5544. // IPv4
  5545. NetworkTypeIpv4 = NetworkTypeKey.String("ipv4")
  5546. // IPv6
  5547. NetworkTypeIpv6 = NetworkTypeKey.String("ipv6")
  5548. )
  5549. // NetworkCarrierIcc returns an attribute KeyValue conforming to the
  5550. // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1
  5551. // alpha-2 2-character country code associated with the mobile carrier network.
  5552. func NetworkCarrierIcc(val string) attribute.KeyValue {
  5553. return NetworkCarrierIccKey.String(val)
  5554. }
  5555. // NetworkCarrierMcc returns an attribute KeyValue conforming to the
  5556. // "network.carrier.mcc" semantic conventions. It represents the mobile carrier
  5557. // country code.
  5558. func NetworkCarrierMcc(val string) attribute.KeyValue {
  5559. return NetworkCarrierMccKey.String(val)
  5560. }
  5561. // NetworkCarrierMnc returns an attribute KeyValue conforming to the
  5562. // "network.carrier.mnc" semantic conventions. It represents the mobile carrier
  5563. // network code.
  5564. func NetworkCarrierMnc(val string) attribute.KeyValue {
  5565. return NetworkCarrierMncKey.String(val)
  5566. }
  5567. // NetworkCarrierName returns an attribute KeyValue conforming to the
  5568. // "network.carrier.name" semantic conventions. It represents the name of the
  5569. // mobile carrier.
  5570. func NetworkCarrierName(val string) attribute.KeyValue {
  5571. return NetworkCarrierNameKey.String(val)
  5572. }
  5573. // NetworkLocalAddress returns an attribute KeyValue conforming to the
  5574. // "network.local.address" semantic conventions. It represents the local
  5575. // address of the network connection - IP address or Unix domain socket name.
  5576. func NetworkLocalAddress(val string) attribute.KeyValue {
  5577. return NetworkLocalAddressKey.String(val)
  5578. }
  5579. // NetworkLocalPort returns an attribute KeyValue conforming to the
  5580. // "network.local.port" semantic conventions. It represents the local port
  5581. // number of the network connection.
  5582. func NetworkLocalPort(val int) attribute.KeyValue {
  5583. return NetworkLocalPortKey.Int(val)
  5584. }
  5585. // NetworkPeerAddress returns an attribute KeyValue conforming to the
  5586. // "network.peer.address" semantic conventions. It represents the peer address
  5587. // of the network connection - IP address or Unix domain socket name.
  5588. func NetworkPeerAddress(val string) attribute.KeyValue {
  5589. return NetworkPeerAddressKey.String(val)
  5590. }
  5591. // NetworkPeerPort returns an attribute KeyValue conforming to the
  5592. // "network.peer.port" semantic conventions. It represents the peer port number
  5593. // of the network connection.
  5594. func NetworkPeerPort(val int) attribute.KeyValue {
  5595. return NetworkPeerPortKey.Int(val)
  5596. }
  5597. // NetworkProtocolName returns an attribute KeyValue conforming to the
  5598. // "network.protocol.name" semantic conventions. It represents the [OSI
  5599. // application layer](https://osi-model.com/application-layer/) or non-OSI
  5600. // equivalent.
  5601. func NetworkProtocolName(val string) attribute.KeyValue {
  5602. return NetworkProtocolNameKey.String(val)
  5603. }
  5604. // NetworkProtocolVersion returns an attribute KeyValue conforming to the
  5605. // "network.protocol.version" semantic conventions. It represents the actual
  5606. // version of the protocol used for network communication.
  5607. func NetworkProtocolVersion(val string) attribute.KeyValue {
  5608. return NetworkProtocolVersionKey.String(val)
  5609. }
  5610. // An OCI image manifest.
  5611. const (
  5612. // OciManifestDigestKey is the attribute Key conforming to the
  5613. // "oci.manifest.digest" semantic conventions. It represents the digest of
  5614. // the OCI image manifest. For container images specifically is the digest
  5615. // by which the container image is known.
  5616. //
  5617. // Type: string
  5618. // RequirementLevel: Optional
  5619. // Stability: experimental
  5620. // Examples:
  5621. // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4'
  5622. // Note: Follows [OCI Image Manifest
  5623. // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md),
  5624. // and specifically the [Digest
  5625. // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests).
  5626. // An example can be found in [Example Image
  5627. // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest).
  5628. OciManifestDigestKey = attribute.Key("oci.manifest.digest")
  5629. )
  5630. // OciManifestDigest returns an attribute KeyValue conforming to the
  5631. // "oci.manifest.digest" semantic conventions. It represents the digest of the
  5632. // OCI image manifest. For container images specifically is the digest by which
  5633. // the container image is known.
  5634. func OciManifestDigest(val string) attribute.KeyValue {
  5635. return OciManifestDigestKey.String(val)
  5636. }
  5637. // Attributes used by the OpenTracing Shim layer.
  5638. const (
  5639. // OpentracingRefTypeKey is the attribute Key conforming to the
  5640. // "opentracing.ref_type" semantic conventions. It represents the
  5641. // parent-child Reference type
  5642. //
  5643. // Type: Enum
  5644. // RequirementLevel: Optional
  5645. // Stability: experimental
  5646. // Note: The causal relationship between a child Span and a parent Span.
  5647. OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
  5648. )
  5649. var (
  5650. // The parent Span depends on the child Span in some capacity
  5651. OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
  5652. // The parent Span doesn't depend in any way on the result of the child Span
  5653. OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
  5654. )
  5655. // The operating system (OS) on which the process represented by this resource
  5656. // is running.
  5657. const (
  5658. // OSBuildIDKey is the attribute Key conforming to the "os.build_id"
  5659. // semantic conventions. It represents the unique identifier for a
  5660. // particular build or compilation of the operating system.
  5661. //
  5662. // Type: string
  5663. // RequirementLevel: Optional
  5664. // Stability: experimental
  5665. // Examples: 'TQ3C.230805.001.B2', '20E247', '22621'
  5666. OSBuildIDKey = attribute.Key("os.build_id")
  5667. // OSDescriptionKey is the attribute Key conforming to the "os.description"
  5668. // semantic conventions. It represents the human readable (not intended to
  5669. // be parsed) OS version information, like e.g. reported by `ver` or
  5670. // `lsb_release -a` commands.
  5671. //
  5672. // Type: string
  5673. // RequirementLevel: Optional
  5674. // Stability: experimental
  5675. // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1
  5676. // LTS'
  5677. OSDescriptionKey = attribute.Key("os.description")
  5678. // OSNameKey is the attribute Key conforming to the "os.name" semantic
  5679. // conventions. It represents the human readable operating system name.
  5680. //
  5681. // Type: string
  5682. // RequirementLevel: Optional
  5683. // Stability: experimental
  5684. // Examples: 'iOS', 'Android', 'Ubuntu'
  5685. OSNameKey = attribute.Key("os.name")
  5686. // OSTypeKey is the attribute Key conforming to the "os.type" semantic
  5687. // conventions. It represents the operating system type.
  5688. //
  5689. // Type: Enum
  5690. // RequirementLevel: Optional
  5691. // Stability: experimental
  5692. OSTypeKey = attribute.Key("os.type")
  5693. // OSVersionKey is the attribute Key conforming to the "os.version"
  5694. // semantic conventions. It represents the version string of the operating
  5695. // system as defined in [Version
  5696. // Attributes](/docs/resource/README.md#version-attributes).
  5697. //
  5698. // Type: string
  5699. // RequirementLevel: Optional
  5700. // Stability: experimental
  5701. // Examples: '14.2.1', '18.04.1'
  5702. OSVersionKey = attribute.Key("os.version")
  5703. )
  5704. var (
  5705. // Microsoft Windows
  5706. OSTypeWindows = OSTypeKey.String("windows")
  5707. // Linux
  5708. OSTypeLinux = OSTypeKey.String("linux")
  5709. // Apple Darwin
  5710. OSTypeDarwin = OSTypeKey.String("darwin")
  5711. // FreeBSD
  5712. OSTypeFreeBSD = OSTypeKey.String("freebsd")
  5713. // NetBSD
  5714. OSTypeNetBSD = OSTypeKey.String("netbsd")
  5715. // OpenBSD
  5716. OSTypeOpenBSD = OSTypeKey.String("openbsd")
  5717. // DragonFly BSD
  5718. OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd")
  5719. // HP-UX (Hewlett Packard Unix)
  5720. OSTypeHPUX = OSTypeKey.String("hpux")
  5721. // AIX (Advanced Interactive eXecutive)
  5722. OSTypeAIX = OSTypeKey.String("aix")
  5723. // SunOS, Oracle Solaris
  5724. OSTypeSolaris = OSTypeKey.String("solaris")
  5725. // IBM z/OS
  5726. OSTypeZOS = OSTypeKey.String("z_os")
  5727. )
  5728. // OSBuildID returns an attribute KeyValue conforming to the "os.build_id"
  5729. // semantic conventions. It represents the unique identifier for a particular
  5730. // build or compilation of the operating system.
  5731. func OSBuildID(val string) attribute.KeyValue {
  5732. return OSBuildIDKey.String(val)
  5733. }
  5734. // OSDescription returns an attribute KeyValue conforming to the
  5735. // "os.description" semantic conventions. It represents the human readable (not
  5736. // intended to be parsed) OS version information, like e.g. reported by `ver`
  5737. // or `lsb_release -a` commands.
  5738. func OSDescription(val string) attribute.KeyValue {
  5739. return OSDescriptionKey.String(val)
  5740. }
  5741. // OSName returns an attribute KeyValue conforming to the "os.name" semantic
  5742. // conventions. It represents the human readable operating system name.
  5743. func OSName(val string) attribute.KeyValue {
  5744. return OSNameKey.String(val)
  5745. }
  5746. // OSVersion returns an attribute KeyValue conforming to the "os.version"
  5747. // semantic conventions. It represents the version string of the operating
  5748. // system as defined in [Version
  5749. // Attributes](/docs/resource/README.md#version-attributes).
  5750. func OSVersion(val string) attribute.KeyValue {
  5751. return OSVersionKey.String(val)
  5752. }
  5753. // Attributes reserved for OpenTelemetry
  5754. const (
  5755. // OTelStatusCodeKey is the attribute Key conforming to the
  5756. // "otel.status_code" semantic conventions. It represents the name of the
  5757. // code, either "OK" or "ERROR". MUST NOT be set if the status code is
  5758. // UNSET.
  5759. //
  5760. // Type: Enum
  5761. // RequirementLevel: Optional
  5762. // Stability: stable
  5763. OTelStatusCodeKey = attribute.Key("otel.status_code")
  5764. // OTelStatusDescriptionKey is the attribute Key conforming to the
  5765. // "otel.status_description" semantic conventions. It represents the
  5766. // description of the Status if it has a value, otherwise not set.
  5767. //
  5768. // Type: string
  5769. // RequirementLevel: Optional
  5770. // Stability: stable
  5771. // Examples: 'resource not found'
  5772. OTelStatusDescriptionKey = attribute.Key("otel.status_description")
  5773. )
  5774. var (
  5775. // The operation has been validated by an Application developer or Operator to have completed successfully
  5776. OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
  5777. // The operation contains an error
  5778. OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
  5779. )
  5780. // OTelStatusDescription returns an attribute KeyValue conforming to the
  5781. // "otel.status_description" semantic conventions. It represents the
  5782. // description of the Status if it has a value, otherwise not set.
  5783. func OTelStatusDescription(val string) attribute.KeyValue {
  5784. return OTelStatusDescriptionKey.String(val)
  5785. }
  5786. // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's
  5787. // concepts.
  5788. const (
  5789. // OTelScopeNameKey is the attribute Key conforming to the
  5790. // "otel.scope.name" semantic conventions. It represents the name of the
  5791. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  5792. //
  5793. // Type: string
  5794. // RequirementLevel: Optional
  5795. // Stability: stable
  5796. // Examples: 'io.opentelemetry.contrib.mongodb'
  5797. OTelScopeNameKey = attribute.Key("otel.scope.name")
  5798. // OTelScopeVersionKey is the attribute Key conforming to the
  5799. // "otel.scope.version" semantic conventions. It represents the version of
  5800. // the instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  5801. //
  5802. // Type: string
  5803. // RequirementLevel: Optional
  5804. // Stability: stable
  5805. // Examples: '1.0.0'
  5806. OTelScopeVersionKey = attribute.Key("otel.scope.version")
  5807. )
  5808. // OTelScopeName returns an attribute KeyValue conforming to the
  5809. // "otel.scope.name" semantic conventions. It represents the name of the
  5810. // instrumentation scope - (`InstrumentationScope.Name` in OTLP).
  5811. func OTelScopeName(val string) attribute.KeyValue {
  5812. return OTelScopeNameKey.String(val)
  5813. }
  5814. // OTelScopeVersion returns an attribute KeyValue conforming to the
  5815. // "otel.scope.version" semantic conventions. It represents the version of the
  5816. // instrumentation scope - (`InstrumentationScope.Version` in OTLP).
  5817. func OTelScopeVersion(val string) attribute.KeyValue {
  5818. return OTelScopeVersionKey.String(val)
  5819. }
  5820. // Operations that access some remote service.
  5821. const (
  5822. // PeerServiceKey is the attribute Key conforming to the "peer.service"
  5823. // semantic conventions. It represents the
  5824. // [`service.name`](/docs/resource/README.md#service) of the remote
  5825. // service. SHOULD be equal to the actual `service.name` resource attribute
  5826. // of the remote service if any.
  5827. //
  5828. // Type: string
  5829. // RequirementLevel: Optional
  5830. // Stability: experimental
  5831. // Examples: 'AuthTokenCache'
  5832. PeerServiceKey = attribute.Key("peer.service")
  5833. )
  5834. // PeerService returns an attribute KeyValue conforming to the
  5835. // "peer.service" semantic conventions. It represents the
  5836. // [`service.name`](/docs/resource/README.md#service) of the remote service.
  5837. // SHOULD be equal to the actual `service.name` resource attribute of the
  5838. // remote service if any.
  5839. func PeerService(val string) attribute.KeyValue {
  5840. return PeerServiceKey.String(val)
  5841. }
  5842. // An operating system process.
  5843. const (
  5844. // ProcessCommandKey is the attribute Key conforming to the
  5845. // "process.command" semantic conventions. It represents the command used
  5846. // to launch the process (i.e. the command name). On Linux based systems,
  5847. // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can
  5848. // be set to the first parameter extracted from `GetCommandLineW`.
  5849. //
  5850. // Type: string
  5851. // RequirementLevel: Optional
  5852. // Stability: experimental
  5853. // Examples: 'cmd/otelcol'
  5854. ProcessCommandKey = attribute.Key("process.command")
  5855. // ProcessCommandArgsKey is the attribute Key conforming to the
  5856. // "process.command_args" semantic conventions. It represents the all the
  5857. // command arguments (including the command/executable itself) as received
  5858. // by the process. On Linux-based systems (and some other Unixoid systems
  5859. // supporting procfs), can be set according to the list of null-delimited
  5860. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  5861. // this would be the full argv vector passed to `main`.
  5862. //
  5863. // Type: string[]
  5864. // RequirementLevel: Optional
  5865. // Stability: experimental
  5866. // Examples: 'cmd/otecol', '--config=config.yaml'
  5867. ProcessCommandArgsKey = attribute.Key("process.command_args")
  5868. // ProcessCommandLineKey is the attribute Key conforming to the
  5869. // "process.command_line" semantic conventions. It represents the full
  5870. // command used to launch the process as a single string representing the
  5871. // full command. On Windows, can be set to the result of `GetCommandLineW`.
  5872. // Do not set this if you have to assemble it just for monitoring; use
  5873. // `process.command_args` instead.
  5874. //
  5875. // Type: string
  5876. // RequirementLevel: Optional
  5877. // Stability: experimental
  5878. // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"'
  5879. ProcessCommandLineKey = attribute.Key("process.command_line")
  5880. // ProcessContextSwitchTypeKey is the attribute Key conforming to the
  5881. // "process.context_switch_type" semantic conventions. It represents the
  5882. // specifies whether the context switches for this data point were
  5883. // voluntary or involuntary.
  5884. //
  5885. // Type: Enum
  5886. // RequirementLevel: Optional
  5887. // Stability: experimental
  5888. ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type")
  5889. // ProcessCreationTimeKey is the attribute Key conforming to the
  5890. // "process.creation.time" semantic conventions. It represents the date and
  5891. // time the process was created, in ISO 8601 format.
  5892. //
  5893. // Type: string
  5894. // RequirementLevel: Optional
  5895. // Stability: experimental
  5896. // Examples: '2023-11-21T09:25:34.853Z'
  5897. ProcessCreationTimeKey = attribute.Key("process.creation.time")
  5898. // ProcessExecutableNameKey is the attribute Key conforming to the
  5899. // "process.executable.name" semantic conventions. It represents the name
  5900. // of the process executable. On Linux based systems, can be set to the
  5901. // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name
  5902. // of `GetProcessImageFileNameW`.
  5903. //
  5904. // Type: string
  5905. // RequirementLevel: Optional
  5906. // Stability: experimental
  5907. // Examples: 'otelcol'
  5908. ProcessExecutableNameKey = attribute.Key("process.executable.name")
  5909. // ProcessExecutablePathKey is the attribute Key conforming to the
  5910. // "process.executable.path" semantic conventions. It represents the full
  5911. // path to the process executable. On Linux based systems, can be set to
  5912. // the target of `proc/[pid]/exe`. On Windows, can be set to the result of
  5913. // `GetProcessImageFileNameW`.
  5914. //
  5915. // Type: string
  5916. // RequirementLevel: Optional
  5917. // Stability: experimental
  5918. // Examples: '/usr/bin/cmd/otelcol'
  5919. ProcessExecutablePathKey = attribute.Key("process.executable.path")
  5920. // ProcessExitCodeKey is the attribute Key conforming to the
  5921. // "process.exit.code" semantic conventions. It represents the exit code of
  5922. // the process.
  5923. //
  5924. // Type: int
  5925. // RequirementLevel: Optional
  5926. // Stability: experimental
  5927. // Examples: 127
  5928. ProcessExitCodeKey = attribute.Key("process.exit.code")
  5929. // ProcessExitTimeKey is the attribute Key conforming to the
  5930. // "process.exit.time" semantic conventions. It represents the date and
  5931. // time the process exited, in ISO 8601 format.
  5932. //
  5933. // Type: string
  5934. // RequirementLevel: Optional
  5935. // Stability: experimental
  5936. // Examples: '2023-11-21T09:26:12.315Z'
  5937. ProcessExitTimeKey = attribute.Key("process.exit.time")
  5938. // ProcessGroupLeaderPIDKey is the attribute Key conforming to the
  5939. // "process.group_leader.pid" semantic conventions. It represents the PID
  5940. // of the process's group leader. This is also the process group ID (PGID)
  5941. // of the process.
  5942. //
  5943. // Type: int
  5944. // RequirementLevel: Optional
  5945. // Stability: experimental
  5946. // Examples: 23
  5947. ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid")
  5948. // ProcessInteractiveKey is the attribute Key conforming to the
  5949. // "process.interactive" semantic conventions. It represents the whether
  5950. // the process is connected to an interactive shell.
  5951. //
  5952. // Type: boolean
  5953. // RequirementLevel: Optional
  5954. // Stability: experimental
  5955. ProcessInteractiveKey = attribute.Key("process.interactive")
  5956. // ProcessOwnerKey is the attribute Key conforming to the "process.owner"
  5957. // semantic conventions. It represents the username of the user that owns
  5958. // the process.
  5959. //
  5960. // Type: string
  5961. // RequirementLevel: Optional
  5962. // Stability: experimental
  5963. // Examples: 'root'
  5964. ProcessOwnerKey = attribute.Key("process.owner")
  5965. // ProcessPagingFaultTypeKey is the attribute Key conforming to the
  5966. // "process.paging.fault_type" semantic conventions. It represents the type
  5967. // of page fault for this data point. Type `major` is for major/hard page
  5968. // faults, and `minor` is for minor/soft page faults.
  5969. //
  5970. // Type: Enum
  5971. // RequirementLevel: Optional
  5972. // Stability: experimental
  5973. ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type")
  5974. // ProcessParentPIDKey is the attribute Key conforming to the
  5975. // "process.parent_pid" semantic conventions. It represents the parent
  5976. // Process identifier (PPID).
  5977. //
  5978. // Type: int
  5979. // RequirementLevel: Optional
  5980. // Stability: experimental
  5981. // Examples: 111
  5982. ProcessParentPIDKey = attribute.Key("process.parent_pid")
  5983. // ProcessPIDKey is the attribute Key conforming to the "process.pid"
  5984. // semantic conventions. It represents the process identifier (PID).
  5985. //
  5986. // Type: int
  5987. // RequirementLevel: Optional
  5988. // Stability: experimental
  5989. // Examples: 1234
  5990. ProcessPIDKey = attribute.Key("process.pid")
  5991. // ProcessRealUserIDKey is the attribute Key conforming to the
  5992. // "process.real_user.id" semantic conventions. It represents the real user
  5993. // ID (RUID) of the process.
  5994. //
  5995. // Type: int
  5996. // RequirementLevel: Optional
  5997. // Stability: experimental
  5998. // Examples: 1000
  5999. ProcessRealUserIDKey = attribute.Key("process.real_user.id")
  6000. // ProcessRealUserNameKey is the attribute Key conforming to the
  6001. // "process.real_user.name" semantic conventions. It represents the
  6002. // username of the real user of the process.
  6003. //
  6004. // Type: string
  6005. // RequirementLevel: Optional
  6006. // Stability: experimental
  6007. // Examples: 'operator'
  6008. ProcessRealUserNameKey = attribute.Key("process.real_user.name")
  6009. // ProcessRuntimeDescriptionKey is the attribute Key conforming to the
  6010. // "process.runtime.description" semantic conventions. It represents an
  6011. // additional description about the runtime of the process, for example a
  6012. // specific vendor customization of the runtime environment.
  6013. //
  6014. // Type: string
  6015. // RequirementLevel: Optional
  6016. // Stability: experimental
  6017. // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0'
  6018. ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description")
  6019. // ProcessRuntimeNameKey is the attribute Key conforming to the
  6020. // "process.runtime.name" semantic conventions. It represents the name of
  6021. // the runtime of this process. For compiled native binaries, this SHOULD
  6022. // be the name of the compiler.
  6023. //
  6024. // Type: string
  6025. // RequirementLevel: Optional
  6026. // Stability: experimental
  6027. // Examples: 'OpenJDK Runtime Environment'
  6028. ProcessRuntimeNameKey = attribute.Key("process.runtime.name")
  6029. // ProcessRuntimeVersionKey is the attribute Key conforming to the
  6030. // "process.runtime.version" semantic conventions. It represents the
  6031. // version of the runtime of this process, as returned by the runtime
  6032. // without modification.
  6033. //
  6034. // Type: string
  6035. // RequirementLevel: Optional
  6036. // Stability: experimental
  6037. // Examples: '14.0.2'
  6038. ProcessRuntimeVersionKey = attribute.Key("process.runtime.version")
  6039. // ProcessSavedUserIDKey is the attribute Key conforming to the
  6040. // "process.saved_user.id" semantic conventions. It represents the saved
  6041. // user ID (SUID) of the process.
  6042. //
  6043. // Type: int
  6044. // RequirementLevel: Optional
  6045. // Stability: experimental
  6046. // Examples: 1002
  6047. ProcessSavedUserIDKey = attribute.Key("process.saved_user.id")
  6048. // ProcessSavedUserNameKey is the attribute Key conforming to the
  6049. // "process.saved_user.name" semantic conventions. It represents the
  6050. // username of the saved user.
  6051. //
  6052. // Type: string
  6053. // RequirementLevel: Optional
  6054. // Stability: experimental
  6055. // Examples: 'operator'
  6056. ProcessSavedUserNameKey = attribute.Key("process.saved_user.name")
  6057. // ProcessSessionLeaderPIDKey is the attribute Key conforming to the
  6058. // "process.session_leader.pid" semantic conventions. It represents the PID
  6059. // of the process's session leader. This is also the session ID (SID) of
  6060. // the process.
  6061. //
  6062. // Type: int
  6063. // RequirementLevel: Optional
  6064. // Stability: experimental
  6065. // Examples: 14
  6066. ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid")
  6067. // ProcessUserIDKey is the attribute Key conforming to the
  6068. // "process.user.id" semantic conventions. It represents the effective user
  6069. // ID (EUID) of the process.
  6070. //
  6071. // Type: int
  6072. // RequirementLevel: Optional
  6073. // Stability: experimental
  6074. // Examples: 1001
  6075. ProcessUserIDKey = attribute.Key("process.user.id")
  6076. // ProcessUserNameKey is the attribute Key conforming to the
  6077. // "process.user.name" semantic conventions. It represents the username of
  6078. // the effective user of the process.
  6079. //
  6080. // Type: string
  6081. // RequirementLevel: Optional
  6082. // Stability: experimental
  6083. // Examples: 'root'
  6084. ProcessUserNameKey = attribute.Key("process.user.name")
  6085. // ProcessVpidKey is the attribute Key conforming to the "process.vpid"
  6086. // semantic conventions. It represents the virtual process identifier.
  6087. //
  6088. // Type: int
  6089. // RequirementLevel: Optional
  6090. // Stability: experimental
  6091. // Examples: 12
  6092. // Note: The process ID within a PID namespace. This is not necessarily
  6093. // unique across all processes on the host but it is unique within the
  6094. // process namespace that the process exists within.
  6095. ProcessVpidKey = attribute.Key("process.vpid")
  6096. )
  6097. var (
  6098. // voluntary
  6099. ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary")
  6100. // involuntary
  6101. ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary")
  6102. )
  6103. var (
  6104. // major
  6105. ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major")
  6106. // minor
  6107. ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor")
  6108. )
  6109. // ProcessCommand returns an attribute KeyValue conforming to the
  6110. // "process.command" semantic conventions. It represents the command used to
  6111. // launch the process (i.e. the command name). On Linux based systems, can be
  6112. // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to
  6113. // the first parameter extracted from `GetCommandLineW`.
  6114. func ProcessCommand(val string) attribute.KeyValue {
  6115. return ProcessCommandKey.String(val)
  6116. }
  6117. // ProcessCommandArgs returns an attribute KeyValue conforming to the
  6118. // "process.command_args" semantic conventions. It represents the all the
  6119. // command arguments (including the command/executable itself) as received by
  6120. // the process. On Linux-based systems (and some other Unixoid systems
  6121. // supporting procfs), can be set according to the list of null-delimited
  6122. // strings extracted from `proc/[pid]/cmdline`. For libc-based executables,
  6123. // this would be the full argv vector passed to `main`.
  6124. func ProcessCommandArgs(val ...string) attribute.KeyValue {
  6125. return ProcessCommandArgsKey.StringSlice(val)
  6126. }
  6127. // ProcessCommandLine returns an attribute KeyValue conforming to the
  6128. // "process.command_line" semantic conventions. It represents the full command
  6129. // used to launch the process as a single string representing the full command.
  6130. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this
  6131. // if you have to assemble it just for monitoring; use `process.command_args`
  6132. // instead.
  6133. func ProcessCommandLine(val string) attribute.KeyValue {
  6134. return ProcessCommandLineKey.String(val)
  6135. }
  6136. // ProcessCreationTime returns an attribute KeyValue conforming to the
  6137. // "process.creation.time" semantic conventions. It represents the date and
  6138. // time the process was created, in ISO 8601 format.
  6139. func ProcessCreationTime(val string) attribute.KeyValue {
  6140. return ProcessCreationTimeKey.String(val)
  6141. }
  6142. // ProcessExecutableName returns an attribute KeyValue conforming to the
  6143. // "process.executable.name" semantic conventions. It represents the name of
  6144. // the process executable. On Linux based systems, can be set to the `Name` in
  6145. // `proc/[pid]/status`. On Windows, can be set to the base name of
  6146. // `GetProcessImageFileNameW`.
  6147. func ProcessExecutableName(val string) attribute.KeyValue {
  6148. return ProcessExecutableNameKey.String(val)
  6149. }
  6150. // ProcessExecutablePath returns an attribute KeyValue conforming to the
  6151. // "process.executable.path" semantic conventions. It represents the full path
  6152. // to the process executable. On Linux based systems, can be set to the target
  6153. // of `proc/[pid]/exe`. On Windows, can be set to the result of
  6154. // `GetProcessImageFileNameW`.
  6155. func ProcessExecutablePath(val string) attribute.KeyValue {
  6156. return ProcessExecutablePathKey.String(val)
  6157. }
  6158. // ProcessExitCode returns an attribute KeyValue conforming to the
  6159. // "process.exit.code" semantic conventions. It represents the exit code of the
  6160. // process.
  6161. func ProcessExitCode(val int) attribute.KeyValue {
  6162. return ProcessExitCodeKey.Int(val)
  6163. }
  6164. // ProcessExitTime returns an attribute KeyValue conforming to the
  6165. // "process.exit.time" semantic conventions. It represents the date and time
  6166. // the process exited, in ISO 8601 format.
  6167. func ProcessExitTime(val string) attribute.KeyValue {
  6168. return ProcessExitTimeKey.String(val)
  6169. }
  6170. // ProcessGroupLeaderPID returns an attribute KeyValue conforming to the
  6171. // "process.group_leader.pid" semantic conventions. It represents the PID of
  6172. // the process's group leader. This is also the process group ID (PGID) of the
  6173. // process.
  6174. func ProcessGroupLeaderPID(val int) attribute.KeyValue {
  6175. return ProcessGroupLeaderPIDKey.Int(val)
  6176. }
  6177. // ProcessInteractive returns an attribute KeyValue conforming to the
  6178. // "process.interactive" semantic conventions. It represents the whether the
  6179. // process is connected to an interactive shell.
  6180. func ProcessInteractive(val bool) attribute.KeyValue {
  6181. return ProcessInteractiveKey.Bool(val)
  6182. }
  6183. // ProcessOwner returns an attribute KeyValue conforming to the
  6184. // "process.owner" semantic conventions. It represents the username of the user
  6185. // that owns the process.
  6186. func ProcessOwner(val string) attribute.KeyValue {
  6187. return ProcessOwnerKey.String(val)
  6188. }
  6189. // ProcessParentPID returns an attribute KeyValue conforming to the
  6190. // "process.parent_pid" semantic conventions. It represents the parent Process
  6191. // identifier (PPID).
  6192. func ProcessParentPID(val int) attribute.KeyValue {
  6193. return ProcessParentPIDKey.Int(val)
  6194. }
  6195. // ProcessPID returns an attribute KeyValue conforming to the "process.pid"
  6196. // semantic conventions. It represents the process identifier (PID).
  6197. func ProcessPID(val int) attribute.KeyValue {
  6198. return ProcessPIDKey.Int(val)
  6199. }
  6200. // ProcessRealUserID returns an attribute KeyValue conforming to the
  6201. // "process.real_user.id" semantic conventions. It represents the real user ID
  6202. // (RUID) of the process.
  6203. func ProcessRealUserID(val int) attribute.KeyValue {
  6204. return ProcessRealUserIDKey.Int(val)
  6205. }
  6206. // ProcessRealUserName returns an attribute KeyValue conforming to the
  6207. // "process.real_user.name" semantic conventions. It represents the username of
  6208. // the real user of the process.
  6209. func ProcessRealUserName(val string) attribute.KeyValue {
  6210. return ProcessRealUserNameKey.String(val)
  6211. }
  6212. // ProcessRuntimeDescription returns an attribute KeyValue conforming to the
  6213. // "process.runtime.description" semantic conventions. It represents an
  6214. // additional description about the runtime of the process, for example a
  6215. // specific vendor customization of the runtime environment.
  6216. func ProcessRuntimeDescription(val string) attribute.KeyValue {
  6217. return ProcessRuntimeDescriptionKey.String(val)
  6218. }
  6219. // ProcessRuntimeName returns an attribute KeyValue conforming to the
  6220. // "process.runtime.name" semantic conventions. It represents the name of the
  6221. // runtime of this process. For compiled native binaries, this SHOULD be the
  6222. // name of the compiler.
  6223. func ProcessRuntimeName(val string) attribute.KeyValue {
  6224. return ProcessRuntimeNameKey.String(val)
  6225. }
  6226. // ProcessRuntimeVersion returns an attribute KeyValue conforming to the
  6227. // "process.runtime.version" semantic conventions. It represents the version of
  6228. // the runtime of this process, as returned by the runtime without
  6229. // modification.
  6230. func ProcessRuntimeVersion(val string) attribute.KeyValue {
  6231. return ProcessRuntimeVersionKey.String(val)
  6232. }
  6233. // ProcessSavedUserID returns an attribute KeyValue conforming to the
  6234. // "process.saved_user.id" semantic conventions. It represents the saved user
  6235. // ID (SUID) of the process.
  6236. func ProcessSavedUserID(val int) attribute.KeyValue {
  6237. return ProcessSavedUserIDKey.Int(val)
  6238. }
  6239. // ProcessSavedUserName returns an attribute KeyValue conforming to the
  6240. // "process.saved_user.name" semantic conventions. It represents the username
  6241. // of the saved user.
  6242. func ProcessSavedUserName(val string) attribute.KeyValue {
  6243. return ProcessSavedUserNameKey.String(val)
  6244. }
  6245. // ProcessSessionLeaderPID returns an attribute KeyValue conforming to the
  6246. // "process.session_leader.pid" semantic conventions. It represents the PID of
  6247. // the process's session leader. This is also the session ID (SID) of the
  6248. // process.
  6249. func ProcessSessionLeaderPID(val int) attribute.KeyValue {
  6250. return ProcessSessionLeaderPIDKey.Int(val)
  6251. }
  6252. // ProcessUserID returns an attribute KeyValue conforming to the
  6253. // "process.user.id" semantic conventions. It represents the effective user ID
  6254. // (EUID) of the process.
  6255. func ProcessUserID(val int) attribute.KeyValue {
  6256. return ProcessUserIDKey.Int(val)
  6257. }
  6258. // ProcessUserName returns an attribute KeyValue conforming to the
  6259. // "process.user.name" semantic conventions. It represents the username of the
  6260. // effective user of the process.
  6261. func ProcessUserName(val string) attribute.KeyValue {
  6262. return ProcessUserNameKey.String(val)
  6263. }
  6264. // ProcessVpid returns an attribute KeyValue conforming to the
  6265. // "process.vpid" semantic conventions. It represents the virtual process
  6266. // identifier.
  6267. func ProcessVpid(val int) attribute.KeyValue {
  6268. return ProcessVpidKey.Int(val)
  6269. }
  6270. // Attributes for process CPU
  6271. const (
  6272. // ProcessCPUStateKey is the attribute Key conforming to the
  6273. // "process.cpu.state" semantic conventions. It represents the CPU state of
  6274. // the process.
  6275. //
  6276. // Type: Enum
  6277. // RequirementLevel: Optional
  6278. // Stability: experimental
  6279. ProcessCPUStateKey = attribute.Key("process.cpu.state")
  6280. )
  6281. var (
  6282. // system
  6283. ProcessCPUStateSystem = ProcessCPUStateKey.String("system")
  6284. // user
  6285. ProcessCPUStateUser = ProcessCPUStateKey.String("user")
  6286. // wait
  6287. ProcessCPUStateWait = ProcessCPUStateKey.String("wait")
  6288. )
  6289. // Attributes for remote procedure calls.
  6290. const (
  6291. // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the
  6292. // "rpc.connect_rpc.error_code" semantic conventions. It represents the
  6293. // [error codes](https://connect.build/docs/protocol/#error-codes) of the
  6294. // Connect request. Error codes are always string values.
  6295. //
  6296. // Type: Enum
  6297. // RequirementLevel: Optional
  6298. // Stability: experimental
  6299. RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code")
  6300. // RPCGRPCStatusCodeKey is the attribute Key conforming to the
  6301. // "rpc.grpc.status_code" semantic conventions. It represents the [numeric
  6302. // status
  6303. // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of
  6304. // the gRPC request.
  6305. //
  6306. // Type: Enum
  6307. // RequirementLevel: Optional
  6308. // Stability: experimental
  6309. RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code")
  6310. // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the
  6311. // "rpc.jsonrpc.error_code" semantic conventions. It represents the
  6312. // `error.code` property of response if it is an error response.
  6313. //
  6314. // Type: int
  6315. // RequirementLevel: Optional
  6316. // Stability: experimental
  6317. // Examples: -32700, 100
  6318. RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code")
  6319. // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the
  6320. // "rpc.jsonrpc.error_message" semantic conventions. It represents the
  6321. // `error.message` property of response if it is an error response.
  6322. //
  6323. // Type: string
  6324. // RequirementLevel: Optional
  6325. // Stability: experimental
  6326. // Examples: 'Parse error', 'User already exists'
  6327. RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message")
  6328. // RPCJsonrpcRequestIDKey is the attribute Key conforming to the
  6329. // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
  6330. // property of request or response. Since protocol allows id to be int,
  6331. // string, `null` or missing (for notifications), value is expected to be
  6332. // cast to string for simplicity. Use empty string in case of `null` value.
  6333. // Omit entirely if this is a notification.
  6334. //
  6335. // Type: string
  6336. // RequirementLevel: Optional
  6337. // Stability: experimental
  6338. // Examples: '10', 'request-7', ''
  6339. RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id")
  6340. // RPCJsonrpcVersionKey is the attribute Key conforming to the
  6341. // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
  6342. // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
  6343. // doesn't specify this, the value can be omitted.
  6344. //
  6345. // Type: string
  6346. // RequirementLevel: Optional
  6347. // Stability: experimental
  6348. // Examples: '2.0', '1.0'
  6349. RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version")
  6350. // RPCMessageCompressedSizeKey is the attribute Key conforming to the
  6351. // "rpc.message.compressed_size" semantic conventions. It represents the
  6352. // compressed size of the message in bytes.
  6353. //
  6354. // Type: int
  6355. // RequirementLevel: Optional
  6356. // Stability: experimental
  6357. RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size")
  6358. // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id"
  6359. // semantic conventions. It represents the mUST be calculated as two
  6360. // different counters starting from `1` one for sent messages and one for
  6361. // received message.
  6362. //
  6363. // Type: int
  6364. // RequirementLevel: Optional
  6365. // Stability: experimental
  6366. // Note: This way we guarantee that the values will be consistent between
  6367. // different implementations.
  6368. RPCMessageIDKey = attribute.Key("rpc.message.id")
  6369. // RPCMessageTypeKey is the attribute Key conforming to the
  6370. // "rpc.message.type" semantic conventions. It represents the whether this
  6371. // is a received or sent message.
  6372. //
  6373. // Type: Enum
  6374. // RequirementLevel: Optional
  6375. // Stability: experimental
  6376. RPCMessageTypeKey = attribute.Key("rpc.message.type")
  6377. // RPCMessageUncompressedSizeKey is the attribute Key conforming to the
  6378. // "rpc.message.uncompressed_size" semantic conventions. It represents the
  6379. // uncompressed size of the message in bytes.
  6380. //
  6381. // Type: int
  6382. // RequirementLevel: Optional
  6383. // Stability: experimental
  6384. RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size")
  6385. // RPCMethodKey is the attribute Key conforming to the "rpc.method"
  6386. // semantic conventions. It represents the name of the (logical) method
  6387. // being called, must be equal to the $method part in the span name.
  6388. //
  6389. // Type: string
  6390. // RequirementLevel: Optional
  6391. // Stability: experimental
  6392. // Examples: 'exampleMethod'
  6393. // Note: This is the logical name of the method from the RPC interface
  6394. // perspective, which can be different from the name of any implementing
  6395. // method/function. The `code.function` attribute may be used to store the
  6396. // latter (e.g., method actually executing the call on the server side, RPC
  6397. // client stub method on the client side).
  6398. RPCMethodKey = attribute.Key("rpc.method")
  6399. // RPCServiceKey is the attribute Key conforming to the "rpc.service"
  6400. // semantic conventions. It represents the full (logical) name of the
  6401. // service being called, including its package name, if applicable.
  6402. //
  6403. // Type: string
  6404. // RequirementLevel: Optional
  6405. // Stability: experimental
  6406. // Examples: 'myservice.EchoService'
  6407. // Note: This is the logical name of the service from the RPC interface
  6408. // perspective, which can be different from the name of any implementing
  6409. // class. The `code.namespace` attribute may be used to store the latter
  6410. // (despite the attribute name, it may include a class name; e.g., class
  6411. // with method actually executing the call on the server side, RPC client
  6412. // stub class on the client side).
  6413. RPCServiceKey = attribute.Key("rpc.service")
  6414. // RPCSystemKey is the attribute Key conforming to the "rpc.system"
  6415. // semantic conventions. It represents a string identifying the remoting
  6416. // system. See below for a list of well-known identifiers.
  6417. //
  6418. // Type: Enum
  6419. // RequirementLevel: Optional
  6420. // Stability: experimental
  6421. RPCSystemKey = attribute.Key("rpc.system")
  6422. )
  6423. var (
  6424. // cancelled
  6425. RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled")
  6426. // unknown
  6427. RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown")
  6428. // invalid_argument
  6429. RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument")
  6430. // deadline_exceeded
  6431. RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded")
  6432. // not_found
  6433. RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found")
  6434. // already_exists
  6435. RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists")
  6436. // permission_denied
  6437. RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied")
  6438. // resource_exhausted
  6439. RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted")
  6440. // failed_precondition
  6441. RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition")
  6442. // aborted
  6443. RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted")
  6444. // out_of_range
  6445. RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range")
  6446. // unimplemented
  6447. RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented")
  6448. // internal
  6449. RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal")
  6450. // unavailable
  6451. RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable")
  6452. // data_loss
  6453. RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss")
  6454. // unauthenticated
  6455. RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated")
  6456. )
  6457. var (
  6458. // OK
  6459. RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0)
  6460. // CANCELLED
  6461. RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1)
  6462. // UNKNOWN
  6463. RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2)
  6464. // INVALID_ARGUMENT
  6465. RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3)
  6466. // DEADLINE_EXCEEDED
  6467. RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4)
  6468. // NOT_FOUND
  6469. RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5)
  6470. // ALREADY_EXISTS
  6471. RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6)
  6472. // PERMISSION_DENIED
  6473. RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7)
  6474. // RESOURCE_EXHAUSTED
  6475. RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8)
  6476. // FAILED_PRECONDITION
  6477. RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9)
  6478. // ABORTED
  6479. RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10)
  6480. // OUT_OF_RANGE
  6481. RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11)
  6482. // UNIMPLEMENTED
  6483. RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12)
  6484. // INTERNAL
  6485. RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13)
  6486. // UNAVAILABLE
  6487. RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14)
  6488. // DATA_LOSS
  6489. RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15)
  6490. // UNAUTHENTICATED
  6491. RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16)
  6492. )
  6493. var (
  6494. // sent
  6495. RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
  6496. // received
  6497. RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
  6498. )
  6499. var (
  6500. // gRPC
  6501. RPCSystemGRPC = RPCSystemKey.String("grpc")
  6502. // Java RMI
  6503. RPCSystemJavaRmi = RPCSystemKey.String("java_rmi")
  6504. // .NET WCF
  6505. RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf")
  6506. // Apache Dubbo
  6507. RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo")
  6508. // Connect RPC
  6509. RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc")
  6510. )
  6511. // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the
  6512. // "rpc.jsonrpc.error_code" semantic conventions. It represents the
  6513. // `error.code` property of response if it is an error response.
  6514. func RPCJsonrpcErrorCode(val int) attribute.KeyValue {
  6515. return RPCJsonrpcErrorCodeKey.Int(val)
  6516. }
  6517. // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the
  6518. // "rpc.jsonrpc.error_message" semantic conventions. It represents the
  6519. // `error.message` property of response if it is an error response.
  6520. func RPCJsonrpcErrorMessage(val string) attribute.KeyValue {
  6521. return RPCJsonrpcErrorMessageKey.String(val)
  6522. }
  6523. // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the
  6524. // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id`
  6525. // property of request or response. Since protocol allows id to be int, string,
  6526. // `null` or missing (for notifications), value is expected to be cast to
  6527. // string for simplicity. Use empty string in case of `null` value. Omit
  6528. // entirely if this is a notification.
  6529. func RPCJsonrpcRequestID(val string) attribute.KeyValue {
  6530. return RPCJsonrpcRequestIDKey.String(val)
  6531. }
  6532. // RPCJsonrpcVersion returns an attribute KeyValue conforming to the
  6533. // "rpc.jsonrpc.version" semantic conventions. It represents the protocol
  6534. // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0
  6535. // doesn't specify this, the value can be omitted.
  6536. func RPCJsonrpcVersion(val string) attribute.KeyValue {
  6537. return RPCJsonrpcVersionKey.String(val)
  6538. }
  6539. // RPCMessageCompressedSize returns an attribute KeyValue conforming to the
  6540. // "rpc.message.compressed_size" semantic conventions. It represents the
  6541. // compressed size of the message in bytes.
  6542. func RPCMessageCompressedSize(val int) attribute.KeyValue {
  6543. return RPCMessageCompressedSizeKey.Int(val)
  6544. }
  6545. // RPCMessageID returns an attribute KeyValue conforming to the
  6546. // "rpc.message.id" semantic conventions. It represents the mUST be calculated
  6547. // as two different counters starting from `1` one for sent messages and one
  6548. // for received message.
  6549. func RPCMessageID(val int) attribute.KeyValue {
  6550. return RPCMessageIDKey.Int(val)
  6551. }
  6552. // RPCMessageUncompressedSize returns an attribute KeyValue conforming to
  6553. // the "rpc.message.uncompressed_size" semantic conventions. It represents the
  6554. // uncompressed size of the message in bytes.
  6555. func RPCMessageUncompressedSize(val int) attribute.KeyValue {
  6556. return RPCMessageUncompressedSizeKey.Int(val)
  6557. }
  6558. // RPCMethod returns an attribute KeyValue conforming to the "rpc.method"
  6559. // semantic conventions. It represents the name of the (logical) method being
  6560. // called, must be equal to the $method part in the span name.
  6561. func RPCMethod(val string) attribute.KeyValue {
  6562. return RPCMethodKey.String(val)
  6563. }
  6564. // RPCService returns an attribute KeyValue conforming to the "rpc.service"
  6565. // semantic conventions. It represents the full (logical) name of the service
  6566. // being called, including its package name, if applicable.
  6567. func RPCService(val string) attribute.KeyValue {
  6568. return RPCServiceKey.String(val)
  6569. }
  6570. // These attributes may be used to describe the server in a connection-based
  6571. // network interaction where there is one side that initiates the connection
  6572. // (the client is the side that initiates the connection). This covers all TCP
  6573. // network interactions since TCP is connection-based and one side initiates
  6574. // the connection (an exception is made for peer-to-peer communication over TCP
  6575. // where the "user-facing" surface of the protocol / API doesn't expose a clear
  6576. // notion of client and server). This also covers UDP network interactions
  6577. // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS.
  6578. const (
  6579. // ServerAddressKey is the attribute Key conforming to the "server.address"
  6580. // semantic conventions. It represents the server domain name if available
  6581. // without reverse DNS lookup; otherwise, IP address or Unix domain socket
  6582. // name.
  6583. //
  6584. // Type: string
  6585. // RequirementLevel: Optional
  6586. // Stability: stable
  6587. // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock'
  6588. // Note: When observed from the client side, and when communicating through
  6589. // an intermediary, `server.address` SHOULD represent the server address
  6590. // behind any intermediaries, for example proxies, if it's available.
  6591. ServerAddressKey = attribute.Key("server.address")
  6592. // ServerPortKey is the attribute Key conforming to the "server.port"
  6593. // semantic conventions. It represents the server port number.
  6594. //
  6595. // Type: int
  6596. // RequirementLevel: Optional
  6597. // Stability: stable
  6598. // Examples: 80, 8080, 443
  6599. // Note: When observed from the client side, and when communicating through
  6600. // an intermediary, `server.port` SHOULD represent the server port behind
  6601. // any intermediaries, for example proxies, if it's available.
  6602. ServerPortKey = attribute.Key("server.port")
  6603. )
  6604. // ServerAddress returns an attribute KeyValue conforming to the
  6605. // "server.address" semantic conventions. It represents the server domain name
  6606. // if available without reverse DNS lookup; otherwise, IP address or Unix
  6607. // domain socket name.
  6608. func ServerAddress(val string) attribute.KeyValue {
  6609. return ServerAddressKey.String(val)
  6610. }
  6611. // ServerPort returns an attribute KeyValue conforming to the "server.port"
  6612. // semantic conventions. It represents the server port number.
  6613. func ServerPort(val int) attribute.KeyValue {
  6614. return ServerPortKey.Int(val)
  6615. }
  6616. // A service instance.
  6617. const (
  6618. // ServiceInstanceIDKey is the attribute Key conforming to the
  6619. // "service.instance.id" semantic conventions. It represents the string ID
  6620. // of the service instance.
  6621. //
  6622. // Type: string
  6623. // RequirementLevel: Optional
  6624. // Stability: experimental
  6625. // Examples: '627cc493-f310-47de-96bd-71410b7dec09'
  6626. // Note: MUST be unique for each instance of the same
  6627. // `service.namespace,service.name` pair (in other words
  6628. // `service.namespace,service.name,service.instance.id` triplet MUST be
  6629. // globally unique). The ID helps to
  6630. // distinguish instances of the same service that exist at the same time
  6631. // (e.g. instances of a horizontally scaled
  6632. // service).
  6633. //
  6634. // Implementations, such as SDKs, are recommended to generate a random
  6635. // Version 1 or Version 4 [RFC
  6636. // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an
  6637. // inherent unique ID as the source of
  6638. // this value if stability is desirable. In that case, the ID SHOULD be
  6639. // used as source of a UUID Version 5 and
  6640. // SHOULD use the following UUID as the namespace:
  6641. // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.
  6642. //
  6643. // UUIDs are typically recommended, as only an opaque value for the
  6644. // purposes of identifying a service instance is
  6645. // needed. Similar to what can be seen in the man page for the
  6646. // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html)
  6647. // file, the underlying
  6648. // data, such as pod name and namespace should be treated as confidential,
  6649. // being the user's choice to expose it
  6650. // or not via another resource attribute.
  6651. //
  6652. // For applications running behind an application server (like unicorn), we
  6653. // do not recommend using one identifier
  6654. // for all processes participating in the application. Instead, it's
  6655. // recommended each division (e.g. a worker
  6656. // thread in unicorn) to have its own instance.id.
  6657. //
  6658. // It's not recommended for a Collector to set `service.instance.id` if it
  6659. // can't unambiguously determine the
  6660. // service instance that is generating that telemetry. For instance,
  6661. // creating an UUID based on `pod.name` will
  6662. // likely be wrong, as the Collector might not know from which container
  6663. // within that pod the telemetry originated.
  6664. // However, Collectors can set the `service.instance.id` if they can
  6665. // unambiguously determine the service instance
  6666. // for that telemetry. This is typically the case for scraping receivers,
  6667. // as they know the target address and
  6668. // port.
  6669. ServiceInstanceIDKey = attribute.Key("service.instance.id")
  6670. // ServiceNameKey is the attribute Key conforming to the "service.name"
  6671. // semantic conventions. It represents the logical name of the service.
  6672. //
  6673. // Type: string
  6674. // RequirementLevel: Optional
  6675. // Stability: stable
  6676. // Examples: 'shoppingcart'
  6677. // Note: MUST be the same for all instances of horizontally scaled
  6678. // services. If the value was not specified, SDKs MUST fallback to
  6679. // `unknown_service:` concatenated with
  6680. // [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If
  6681. // `process.executable.name` is not available, the value MUST be set to
  6682. // `unknown_service`.
  6683. ServiceNameKey = attribute.Key("service.name")
  6684. // ServiceNamespaceKey is the attribute Key conforming to the
  6685. // "service.namespace" semantic conventions. It represents a namespace for
  6686. // `service.name`.
  6687. //
  6688. // Type: string
  6689. // RequirementLevel: Optional
  6690. // Stability: experimental
  6691. // Examples: 'Shop'
  6692. // Note: A string value having a meaning that helps to distinguish a group
  6693. // of services, for example the team name that owns a group of services.
  6694. // `service.name` is expected to be unique within the same namespace. If
  6695. // `service.namespace` is not specified in the Resource then `service.name`
  6696. // is expected to be unique for all services that have no explicit
  6697. // namespace defined (so the empty/unspecified namespace is simply one more
  6698. // valid namespace). Zero-length namespace string is assumed equal to
  6699. // unspecified namespace.
  6700. ServiceNamespaceKey = attribute.Key("service.namespace")
  6701. // ServiceVersionKey is the attribute Key conforming to the
  6702. // "service.version" semantic conventions. It represents the version string
  6703. // of the service API or implementation. The format is not defined by these
  6704. // conventions.
  6705. //
  6706. // Type: string
  6707. // RequirementLevel: Optional
  6708. // Stability: stable
  6709. // Examples: '2.0.0', 'a01dbef8a'
  6710. ServiceVersionKey = attribute.Key("service.version")
  6711. )
  6712. // ServiceInstanceID returns an attribute KeyValue conforming to the
  6713. // "service.instance.id" semantic conventions. It represents the string ID of
  6714. // the service instance.
  6715. func ServiceInstanceID(val string) attribute.KeyValue {
  6716. return ServiceInstanceIDKey.String(val)
  6717. }
  6718. // ServiceName returns an attribute KeyValue conforming to the
  6719. // "service.name" semantic conventions. It represents the logical name of the
  6720. // service.
  6721. func ServiceName(val string) attribute.KeyValue {
  6722. return ServiceNameKey.String(val)
  6723. }
  6724. // ServiceNamespace returns an attribute KeyValue conforming to the
  6725. // "service.namespace" semantic conventions. It represents a namespace for
  6726. // `service.name`.
  6727. func ServiceNamespace(val string) attribute.KeyValue {
  6728. return ServiceNamespaceKey.String(val)
  6729. }
  6730. // ServiceVersion returns an attribute KeyValue conforming to the
  6731. // "service.version" semantic conventions. It represents the version string of
  6732. // the service API or implementation. The format is not defined by these
  6733. // conventions.
  6734. func ServiceVersion(val string) attribute.KeyValue {
  6735. return ServiceVersionKey.String(val)
  6736. }
  6737. // Session is defined as the period of time encompassing all activities
  6738. // performed by the application and the actions executed by the end user.
  6739. // Consequently, a Session is represented as a collection of Logs, Events, and
  6740. // Spans emitted by the Client Application throughout the Session's duration.
  6741. // Each Session is assigned a unique identifier, which is included as an
  6742. // attribute in the Logs, Events, and Spans generated during the Session's
  6743. // lifecycle.
  6744. // When a session reaches end of life, typically due to user inactivity or
  6745. // session timeout, a new session identifier will be assigned. The previous
  6746. // session identifier may be provided by the instrumentation so that telemetry
  6747. // backends can link the two sessions.
  6748. const (
  6749. // SessionIDKey is the attribute Key conforming to the "session.id"
  6750. // semantic conventions. It represents a unique id to identify a session.
  6751. //
  6752. // Type: string
  6753. // RequirementLevel: Optional
  6754. // Stability: experimental
  6755. // Examples: '00112233-4455-6677-8899-aabbccddeeff'
  6756. SessionIDKey = attribute.Key("session.id")
  6757. // SessionPreviousIDKey is the attribute Key conforming to the
  6758. // "session.previous_id" semantic conventions. It represents the previous
  6759. // `session.id` for this user, when known.
  6760. //
  6761. // Type: string
  6762. // RequirementLevel: Optional
  6763. // Stability: experimental
  6764. // Examples: '00112233-4455-6677-8899-aabbccddeeff'
  6765. SessionPreviousIDKey = attribute.Key("session.previous_id")
  6766. )
  6767. // SessionID returns an attribute KeyValue conforming to the "session.id"
  6768. // semantic conventions. It represents a unique id to identify a session.
  6769. func SessionID(val string) attribute.KeyValue {
  6770. return SessionIDKey.String(val)
  6771. }
  6772. // SessionPreviousID returns an attribute KeyValue conforming to the
  6773. // "session.previous_id" semantic conventions. It represents the previous
  6774. // `session.id` for this user, when known.
  6775. func SessionPreviousID(val string) attribute.KeyValue {
  6776. return SessionPreviousIDKey.String(val)
  6777. }
  6778. // SignalR attributes
  6779. const (
  6780. // SignalrConnectionStatusKey is the attribute Key conforming to the
  6781. // "signalr.connection.status" semantic conventions. It represents the
  6782. // signalR HTTP connection closure status.
  6783. //
  6784. // Type: Enum
  6785. // RequirementLevel: Optional
  6786. // Stability: stable
  6787. // Examples: 'app_shutdown', 'timeout'
  6788. SignalrConnectionStatusKey = attribute.Key("signalr.connection.status")
  6789. // SignalrTransportKey is the attribute Key conforming to the
  6790. // "signalr.transport" semantic conventions. It represents the [SignalR
  6791. // transport
  6792. // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)
  6793. //
  6794. // Type: Enum
  6795. // RequirementLevel: Optional
  6796. // Stability: stable
  6797. // Examples: 'web_sockets', 'long_polling'
  6798. SignalrTransportKey = attribute.Key("signalr.transport")
  6799. )
  6800. var (
  6801. // The connection was closed normally
  6802. SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure")
  6803. // The connection was closed due to a timeout
  6804. SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout")
  6805. // The connection was closed because the app is shutting down
  6806. SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown")
  6807. )
  6808. var (
  6809. // ServerSentEvents protocol
  6810. SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events")
  6811. // LongPolling protocol
  6812. SignalrTransportLongPolling = SignalrTransportKey.String("long_polling")
  6813. // WebSockets protocol
  6814. SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets")
  6815. )
  6816. // These attributes may be used to describe the sender of a network
  6817. // exchange/packet. These should be used when there is no client/server
  6818. // relationship between the two sides, or when that relationship is unknown.
  6819. // This covers low-level network interactions (e.g. packet tracing) where you
  6820. // don't know if there was a connection or which side initiated it. This also
  6821. // covers unidirectional UDP flows and peer-to-peer communication where the
  6822. // "user-facing" surface of the protocol / API doesn't expose a clear notion of
  6823. // client and server.
  6824. const (
  6825. // SourceAddressKey is the attribute Key conforming to the "source.address"
  6826. // semantic conventions. It represents the source address - domain name if
  6827. // available without reverse DNS lookup; otherwise, IP address or Unix
  6828. // domain socket name.
  6829. //
  6830. // Type: string
  6831. // RequirementLevel: Optional
  6832. // Stability: experimental
  6833. // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock'
  6834. // Note: When observed from the destination side, and when communicating
  6835. // through an intermediary, `source.address` SHOULD represent the source
  6836. // address behind any intermediaries, for example proxies, if it's
  6837. // available.
  6838. SourceAddressKey = attribute.Key("source.address")
  6839. // SourcePortKey is the attribute Key conforming to the "source.port"
  6840. // semantic conventions. It represents the source port number
  6841. //
  6842. // Type: int
  6843. // RequirementLevel: Optional
  6844. // Stability: experimental
  6845. // Examples: 3389, 2888
  6846. SourcePortKey = attribute.Key("source.port")
  6847. )
  6848. // SourceAddress returns an attribute KeyValue conforming to the
  6849. // "source.address" semantic conventions. It represents the source address -
  6850. // domain name if available without reverse DNS lookup; otherwise, IP address
  6851. // or Unix domain socket name.
  6852. func SourceAddress(val string) attribute.KeyValue {
  6853. return SourceAddressKey.String(val)
  6854. }
  6855. // SourcePort returns an attribute KeyValue conforming to the "source.port"
  6856. // semantic conventions. It represents the source port number
  6857. func SourcePort(val int) attribute.KeyValue {
  6858. return SourcePortKey.Int(val)
  6859. }
  6860. // Describes System attributes
  6861. const (
  6862. // SystemDeviceKey is the attribute Key conforming to the "system.device"
  6863. // semantic conventions. It represents the device identifier
  6864. //
  6865. // Type: string
  6866. // RequirementLevel: Optional
  6867. // Stability: experimental
  6868. // Examples: '(identifier)'
  6869. SystemDeviceKey = attribute.Key("system.device")
  6870. )
  6871. // SystemDevice returns an attribute KeyValue conforming to the
  6872. // "system.device" semantic conventions. It represents the device identifier
  6873. func SystemDevice(val string) attribute.KeyValue {
  6874. return SystemDeviceKey.String(val)
  6875. }
  6876. // Describes System CPU attributes
  6877. const (
  6878. // SystemCPULogicalNumberKey is the attribute Key conforming to the
  6879. // "system.cpu.logical_number" semantic conventions. It represents the
  6880. // logical CPU number [0..n-1]
  6881. //
  6882. // Type: int
  6883. // RequirementLevel: Optional
  6884. // Stability: experimental
  6885. // Examples: 1
  6886. SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number")
  6887. // SystemCPUStateKey is the attribute Key conforming to the
  6888. // "system.cpu.state" semantic conventions. It represents the state of the
  6889. // CPU
  6890. //
  6891. // Type: Enum
  6892. // RequirementLevel: Optional
  6893. // Stability: experimental
  6894. // Examples: 'idle', 'interrupt'
  6895. SystemCPUStateKey = attribute.Key("system.cpu.state")
  6896. )
  6897. var (
  6898. // user
  6899. SystemCPUStateUser = SystemCPUStateKey.String("user")
  6900. // system
  6901. SystemCPUStateSystem = SystemCPUStateKey.String("system")
  6902. // nice
  6903. SystemCPUStateNice = SystemCPUStateKey.String("nice")
  6904. // idle
  6905. SystemCPUStateIdle = SystemCPUStateKey.String("idle")
  6906. // iowait
  6907. SystemCPUStateIowait = SystemCPUStateKey.String("iowait")
  6908. // interrupt
  6909. SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt")
  6910. // steal
  6911. SystemCPUStateSteal = SystemCPUStateKey.String("steal")
  6912. )
  6913. // SystemCPULogicalNumber returns an attribute KeyValue conforming to the
  6914. // "system.cpu.logical_number" semantic conventions. It represents the logical
  6915. // CPU number [0..n-1]
  6916. func SystemCPULogicalNumber(val int) attribute.KeyValue {
  6917. return SystemCPULogicalNumberKey.Int(val)
  6918. }
  6919. // Describes System Memory attributes
  6920. const (
  6921. // SystemMemoryStateKey is the attribute Key conforming to the
  6922. // "system.memory.state" semantic conventions. It represents the memory
  6923. // state
  6924. //
  6925. // Type: Enum
  6926. // RequirementLevel: Optional
  6927. // Stability: experimental
  6928. // Examples: 'free', 'cached'
  6929. SystemMemoryStateKey = attribute.Key("system.memory.state")
  6930. )
  6931. var (
  6932. // used
  6933. SystemMemoryStateUsed = SystemMemoryStateKey.String("used")
  6934. // free
  6935. SystemMemoryStateFree = SystemMemoryStateKey.String("free")
  6936. // shared
  6937. SystemMemoryStateShared = SystemMemoryStateKey.String("shared")
  6938. // buffers
  6939. SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers")
  6940. // cached
  6941. SystemMemoryStateCached = SystemMemoryStateKey.String("cached")
  6942. )
  6943. // Describes System Memory Paging attributes
  6944. const (
  6945. // SystemPagingDirectionKey is the attribute Key conforming to the
  6946. // "system.paging.direction" semantic conventions. It represents the paging
  6947. // access direction
  6948. //
  6949. // Type: Enum
  6950. // RequirementLevel: Optional
  6951. // Stability: experimental
  6952. // Examples: 'in'
  6953. SystemPagingDirectionKey = attribute.Key("system.paging.direction")
  6954. // SystemPagingStateKey is the attribute Key conforming to the
  6955. // "system.paging.state" semantic conventions. It represents the memory
  6956. // paging state
  6957. //
  6958. // Type: Enum
  6959. // RequirementLevel: Optional
  6960. // Stability: experimental
  6961. // Examples: 'free'
  6962. SystemPagingStateKey = attribute.Key("system.paging.state")
  6963. // SystemPagingTypeKey is the attribute Key conforming to the
  6964. // "system.paging.type" semantic conventions. It represents the memory
  6965. // paging type
  6966. //
  6967. // Type: Enum
  6968. // RequirementLevel: Optional
  6969. // Stability: experimental
  6970. // Examples: 'minor'
  6971. SystemPagingTypeKey = attribute.Key("system.paging.type")
  6972. )
  6973. var (
  6974. // in
  6975. SystemPagingDirectionIn = SystemPagingDirectionKey.String("in")
  6976. // out
  6977. SystemPagingDirectionOut = SystemPagingDirectionKey.String("out")
  6978. )
  6979. var (
  6980. // used
  6981. SystemPagingStateUsed = SystemPagingStateKey.String("used")
  6982. // free
  6983. SystemPagingStateFree = SystemPagingStateKey.String("free")
  6984. )
  6985. var (
  6986. // major
  6987. SystemPagingTypeMajor = SystemPagingTypeKey.String("major")
  6988. // minor
  6989. SystemPagingTypeMinor = SystemPagingTypeKey.String("minor")
  6990. )
  6991. // Describes Filesystem attributes
  6992. const (
  6993. // SystemFilesystemModeKey is the attribute Key conforming to the
  6994. // "system.filesystem.mode" semantic conventions. It represents the
  6995. // filesystem mode
  6996. //
  6997. // Type: string
  6998. // RequirementLevel: Optional
  6999. // Stability: experimental
  7000. // Examples: 'rw, ro'
  7001. SystemFilesystemModeKey = attribute.Key("system.filesystem.mode")
  7002. // SystemFilesystemMountpointKey is the attribute Key conforming to the
  7003. // "system.filesystem.mountpoint" semantic conventions. It represents the
  7004. // filesystem mount path
  7005. //
  7006. // Type: string
  7007. // RequirementLevel: Optional
  7008. // Stability: experimental
  7009. // Examples: '/mnt/data'
  7010. SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint")
  7011. // SystemFilesystemStateKey is the attribute Key conforming to the
  7012. // "system.filesystem.state" semantic conventions. It represents the
  7013. // filesystem state
  7014. //
  7015. // Type: Enum
  7016. // RequirementLevel: Optional
  7017. // Stability: experimental
  7018. // Examples: 'used'
  7019. SystemFilesystemStateKey = attribute.Key("system.filesystem.state")
  7020. // SystemFilesystemTypeKey is the attribute Key conforming to the
  7021. // "system.filesystem.type" semantic conventions. It represents the
  7022. // filesystem type
  7023. //
  7024. // Type: Enum
  7025. // RequirementLevel: Optional
  7026. // Stability: experimental
  7027. // Examples: 'ext4'
  7028. SystemFilesystemTypeKey = attribute.Key("system.filesystem.type")
  7029. )
  7030. var (
  7031. // used
  7032. SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used")
  7033. // free
  7034. SystemFilesystemStateFree = SystemFilesystemStateKey.String("free")
  7035. // reserved
  7036. SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved")
  7037. )
  7038. var (
  7039. // fat32
  7040. SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32")
  7041. // exfat
  7042. SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat")
  7043. // ntfs
  7044. SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs")
  7045. // refs
  7046. SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs")
  7047. // hfsplus
  7048. SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus")
  7049. // ext4
  7050. SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4")
  7051. )
  7052. // SystemFilesystemMode returns an attribute KeyValue conforming to the
  7053. // "system.filesystem.mode" semantic conventions. It represents the filesystem
  7054. // mode
  7055. func SystemFilesystemMode(val string) attribute.KeyValue {
  7056. return SystemFilesystemModeKey.String(val)
  7057. }
  7058. // SystemFilesystemMountpoint returns an attribute KeyValue conforming to
  7059. // the "system.filesystem.mountpoint" semantic conventions. It represents the
  7060. // filesystem mount path
  7061. func SystemFilesystemMountpoint(val string) attribute.KeyValue {
  7062. return SystemFilesystemMountpointKey.String(val)
  7063. }
  7064. // Describes Network attributes
  7065. const (
  7066. // SystemNetworkStateKey is the attribute Key conforming to the
  7067. // "system.network.state" semantic conventions. It represents a stateless
  7068. // protocol MUST NOT set this attribute
  7069. //
  7070. // Type: Enum
  7071. // RequirementLevel: Optional
  7072. // Stability: experimental
  7073. // Examples: 'close_wait'
  7074. SystemNetworkStateKey = attribute.Key("system.network.state")
  7075. )
  7076. var (
  7077. // close
  7078. SystemNetworkStateClose = SystemNetworkStateKey.String("close")
  7079. // close_wait
  7080. SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait")
  7081. // closing
  7082. SystemNetworkStateClosing = SystemNetworkStateKey.String("closing")
  7083. // delete
  7084. SystemNetworkStateDelete = SystemNetworkStateKey.String("delete")
  7085. // established
  7086. SystemNetworkStateEstablished = SystemNetworkStateKey.String("established")
  7087. // fin_wait_1
  7088. SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1")
  7089. // fin_wait_2
  7090. SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2")
  7091. // last_ack
  7092. SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack")
  7093. // listen
  7094. SystemNetworkStateListen = SystemNetworkStateKey.String("listen")
  7095. // syn_recv
  7096. SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv")
  7097. // syn_sent
  7098. SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent")
  7099. // time_wait
  7100. SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait")
  7101. )
  7102. // Describes System Process attributes
  7103. const (
  7104. // SystemProcessStatusKey is the attribute Key conforming to the
  7105. // "system.process.status" semantic conventions. It represents the process
  7106. // state, e.g., [Linux Process State
  7107. // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES)
  7108. //
  7109. // Type: Enum
  7110. // RequirementLevel: Optional
  7111. // Stability: experimental
  7112. // Examples: 'running'
  7113. SystemProcessStatusKey = attribute.Key("system.process.status")
  7114. )
  7115. var (
  7116. // running
  7117. SystemProcessStatusRunning = SystemProcessStatusKey.String("running")
  7118. // sleeping
  7119. SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping")
  7120. // stopped
  7121. SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped")
  7122. // defunct
  7123. SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct")
  7124. )
  7125. // Attributes for telemetry SDK.
  7126. const (
  7127. // TelemetrySDKLanguageKey is the attribute Key conforming to the
  7128. // "telemetry.sdk.language" semantic conventions. It represents the
  7129. // language of the telemetry SDK.
  7130. //
  7131. // Type: Enum
  7132. // RequirementLevel: Required
  7133. // Stability: stable
  7134. TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language")
  7135. // TelemetrySDKNameKey is the attribute Key conforming to the
  7136. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  7137. // telemetry SDK as defined above.
  7138. //
  7139. // Type: string
  7140. // RequirementLevel: Required
  7141. // Stability: stable
  7142. // Examples: 'opentelemetry'
  7143. // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute
  7144. // to `opentelemetry`.
  7145. // If another SDK, like a fork or a vendor-provided implementation, is
  7146. // used, this SDK MUST set the
  7147. // `telemetry.sdk.name` attribute to the fully-qualified class or module
  7148. // name of this SDK's main entry point
  7149. // or another suitable identifier depending on the language.
  7150. // The identifier `opentelemetry` is reserved and MUST NOT be used in this
  7151. // case.
  7152. // All custom identifiers SHOULD be stable across different versions of an
  7153. // implementation.
  7154. TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name")
  7155. // TelemetrySDKVersionKey is the attribute Key conforming to the
  7156. // "telemetry.sdk.version" semantic conventions. It represents the version
  7157. // string of the telemetry SDK.
  7158. //
  7159. // Type: string
  7160. // RequirementLevel: Required
  7161. // Stability: stable
  7162. // Examples: '1.2.3'
  7163. TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version")
  7164. // TelemetryDistroNameKey is the attribute Key conforming to the
  7165. // "telemetry.distro.name" semantic conventions. It represents the name of
  7166. // the auto instrumentation agent or distribution, if used.
  7167. //
  7168. // Type: string
  7169. // RequirementLevel: Optional
  7170. // Stability: experimental
  7171. // Examples: 'parts-unlimited-java'
  7172. // Note: Official auto instrumentation agents and distributions SHOULD set
  7173. // the `telemetry.distro.name` attribute to
  7174. // a string starting with `opentelemetry-`, e.g.
  7175. // `opentelemetry-java-instrumentation`.
  7176. TelemetryDistroNameKey = attribute.Key("telemetry.distro.name")
  7177. // TelemetryDistroVersionKey is the attribute Key conforming to the
  7178. // "telemetry.distro.version" semantic conventions. It represents the
  7179. // version string of the auto instrumentation agent or distribution, if
  7180. // used.
  7181. //
  7182. // Type: string
  7183. // RequirementLevel: Optional
  7184. // Stability: experimental
  7185. // Examples: '1.2.3'
  7186. TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version")
  7187. )
  7188. var (
  7189. // cpp
  7190. TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp")
  7191. // dotnet
  7192. TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet")
  7193. // erlang
  7194. TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang")
  7195. // go
  7196. TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go")
  7197. // java
  7198. TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java")
  7199. // nodejs
  7200. TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs")
  7201. // php
  7202. TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php")
  7203. // python
  7204. TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python")
  7205. // ruby
  7206. TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby")
  7207. // rust
  7208. TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust")
  7209. // swift
  7210. TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift")
  7211. // webjs
  7212. TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs")
  7213. )
  7214. // TelemetrySDKName returns an attribute KeyValue conforming to the
  7215. // "telemetry.sdk.name" semantic conventions. It represents the name of the
  7216. // telemetry SDK as defined above.
  7217. func TelemetrySDKName(val string) attribute.KeyValue {
  7218. return TelemetrySDKNameKey.String(val)
  7219. }
  7220. // TelemetrySDKVersion returns an attribute KeyValue conforming to the
  7221. // "telemetry.sdk.version" semantic conventions. It represents the version
  7222. // string of the telemetry SDK.
  7223. func TelemetrySDKVersion(val string) attribute.KeyValue {
  7224. return TelemetrySDKVersionKey.String(val)
  7225. }
  7226. // TelemetryDistroName returns an attribute KeyValue conforming to the
  7227. // "telemetry.distro.name" semantic conventions. It represents the name of the
  7228. // auto instrumentation agent or distribution, if used.
  7229. func TelemetryDistroName(val string) attribute.KeyValue {
  7230. return TelemetryDistroNameKey.String(val)
  7231. }
  7232. // TelemetryDistroVersion returns an attribute KeyValue conforming to the
  7233. // "telemetry.distro.version" semantic conventions. It represents the version
  7234. // string of the auto instrumentation agent or distribution, if used.
  7235. func TelemetryDistroVersion(val string) attribute.KeyValue {
  7236. return TelemetryDistroVersionKey.String(val)
  7237. }
  7238. // These attributes may be used for any operation to store information about a
  7239. // thread that started a span.
  7240. const (
  7241. // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic
  7242. // conventions. It represents the current "managed" thread ID (as opposed
  7243. // to OS thread ID).
  7244. //
  7245. // Type: int
  7246. // RequirementLevel: Optional
  7247. // Stability: experimental
  7248. // Examples: 42
  7249. ThreadIDKey = attribute.Key("thread.id")
  7250. // ThreadNameKey is the attribute Key conforming to the "thread.name"
  7251. // semantic conventions. It represents the current thread name.
  7252. //
  7253. // Type: string
  7254. // RequirementLevel: Optional
  7255. // Stability: experimental
  7256. // Examples: 'main'
  7257. ThreadNameKey = attribute.Key("thread.name")
  7258. )
  7259. // ThreadID returns an attribute KeyValue conforming to the "thread.id"
  7260. // semantic conventions. It represents the current "managed" thread ID (as
  7261. // opposed to OS thread ID).
  7262. func ThreadID(val int) attribute.KeyValue {
  7263. return ThreadIDKey.Int(val)
  7264. }
  7265. // ThreadName returns an attribute KeyValue conforming to the "thread.name"
  7266. // semantic conventions. It represents the current thread name.
  7267. func ThreadName(val string) attribute.KeyValue {
  7268. return ThreadNameKey.String(val)
  7269. }
  7270. // Semantic convention attributes in the TLS namespace.
  7271. const (
  7272. // TLSCipherKey is the attribute Key conforming to the "tls.cipher"
  7273. // semantic conventions. It represents the string indicating the
  7274. // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5)
  7275. // used during the current connection.
  7276. //
  7277. // Type: string
  7278. // RequirementLevel: Optional
  7279. // Stability: experimental
  7280. // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',
  7281. // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
  7282. // Note: The values allowed for `tls.cipher` MUST be one of the
  7283. // `Descriptions` of the [registered TLS Cipher
  7284. // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4).
  7285. TLSCipherKey = attribute.Key("tls.cipher")
  7286. // TLSClientCertificateKey is the attribute Key conforming to the
  7287. // "tls.client.certificate" semantic conventions. It represents the
  7288. // pEM-encoded stand-alone certificate offered by the client. This is
  7289. // usually mutually-exclusive of `client.certificate_chain` since this
  7290. // value also exists in that list.
  7291. //
  7292. // Type: string
  7293. // RequirementLevel: Optional
  7294. // Stability: experimental
  7295. // Examples: 'MII...'
  7296. TLSClientCertificateKey = attribute.Key("tls.client.certificate")
  7297. // TLSClientCertificateChainKey is the attribute Key conforming to the
  7298. // "tls.client.certificate_chain" semantic conventions. It represents the
  7299. // array of PEM-encoded certificates that make up the certificate chain
  7300. // offered by the client. This is usually mutually-exclusive of
  7301. // `client.certificate` since that value should be the first certificate in
  7302. // the chain.
  7303. //
  7304. // Type: string[]
  7305. // RequirementLevel: Optional
  7306. // Stability: experimental
  7307. // Examples: 'MII...', 'MI...'
  7308. TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain")
  7309. // TLSClientHashMd5Key is the attribute Key conforming to the
  7310. // "tls.client.hash.md5" semantic conventions. It represents the
  7311. // certificate fingerprint using the MD5 digest of DER-encoded version of
  7312. // certificate offered by the client. For consistency with other hash
  7313. // values, this value should be formatted as an uppercase hash.
  7314. //
  7315. // Type: string
  7316. // RequirementLevel: Optional
  7317. // Stability: experimental
  7318. // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
  7319. TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5")
  7320. // TLSClientHashSha1Key is the attribute Key conforming to the
  7321. // "tls.client.hash.sha1" semantic conventions. It represents the
  7322. // certificate fingerprint using the SHA1 digest of DER-encoded version of
  7323. // certificate offered by the client. For consistency with other hash
  7324. // values, this value should be formatted as an uppercase hash.
  7325. //
  7326. // Type: string
  7327. // RequirementLevel: Optional
  7328. // Stability: experimental
  7329. // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
  7330. TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1")
  7331. // TLSClientHashSha256Key is the attribute Key conforming to the
  7332. // "tls.client.hash.sha256" semantic conventions. It represents the
  7333. // certificate fingerprint using the SHA256 digest of DER-encoded version
  7334. // of certificate offered by the client. For consistency with other hash
  7335. // values, this value should be formatted as an uppercase hash.
  7336. //
  7337. // Type: string
  7338. // RequirementLevel: Optional
  7339. // Stability: experimental
  7340. // Examples:
  7341. // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
  7342. TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256")
  7343. // TLSClientIssuerKey is the attribute Key conforming to the
  7344. // "tls.client.issuer" semantic conventions. It represents the
  7345. // distinguished name of
  7346. // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
  7347. // of the issuer of the x.509 certificate presented by the client.
  7348. //
  7349. // Type: string
  7350. // RequirementLevel: Optional
  7351. // Stability: experimental
  7352. // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
  7353. // DC=com'
  7354. TLSClientIssuerKey = attribute.Key("tls.client.issuer")
  7355. // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3"
  7356. // semantic conventions. It represents a hash that identifies clients based
  7357. // on how they perform an SSL/TLS handshake.
  7358. //
  7359. // Type: string
  7360. // RequirementLevel: Optional
  7361. // Stability: experimental
  7362. // Examples: 'd4e5b18d6b55c71272893221c96ba240'
  7363. TLSClientJa3Key = attribute.Key("tls.client.ja3")
  7364. // TLSClientNotAfterKey is the attribute Key conforming to the
  7365. // "tls.client.not_after" semantic conventions. It represents the date/Time
  7366. // indicating when client certificate is no longer considered valid.
  7367. //
  7368. // Type: string
  7369. // RequirementLevel: Optional
  7370. // Stability: experimental
  7371. // Examples: '2021-01-01T00:00:00.000Z'
  7372. TLSClientNotAfterKey = attribute.Key("tls.client.not_after")
  7373. // TLSClientNotBeforeKey is the attribute Key conforming to the
  7374. // "tls.client.not_before" semantic conventions. It represents the
  7375. // date/Time indicating when client certificate is first considered valid.
  7376. //
  7377. // Type: string
  7378. // RequirementLevel: Optional
  7379. // Stability: experimental
  7380. // Examples: '1970-01-01T00:00:00.000Z'
  7381. TLSClientNotBeforeKey = attribute.Key("tls.client.not_before")
  7382. // TLSClientServerNameKey is the attribute Key conforming to the
  7383. // "tls.client.server_name" semantic conventions. It represents the also
  7384. // called an SNI, this tells the server which hostname to which the client
  7385. // is attempting to connect to.
  7386. //
  7387. // Type: string
  7388. // RequirementLevel: Optional
  7389. // Stability: experimental
  7390. // Examples: 'opentelemetry.io'
  7391. TLSClientServerNameKey = attribute.Key("tls.client.server_name")
  7392. // TLSClientSubjectKey is the attribute Key conforming to the
  7393. // "tls.client.subject" semantic conventions. It represents the
  7394. // distinguished name of subject of the x.509 certificate presented by the
  7395. // client.
  7396. //
  7397. // Type: string
  7398. // RequirementLevel: Optional
  7399. // Stability: experimental
  7400. // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com'
  7401. TLSClientSubjectKey = attribute.Key("tls.client.subject")
  7402. // TLSClientSupportedCiphersKey is the attribute Key conforming to the
  7403. // "tls.client.supported_ciphers" semantic conventions. It represents the
  7404. // array of ciphers offered by the client during the client hello.
  7405. //
  7406. // Type: string[]
  7407. // RequirementLevel: Optional
  7408. // Stability: experimental
  7409. // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
  7410. // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."'
  7411. TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers")
  7412. // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic
  7413. // conventions. It represents the string indicating the curve used for the
  7414. // given cipher, when applicable
  7415. //
  7416. // Type: string
  7417. // RequirementLevel: Optional
  7418. // Stability: experimental
  7419. // Examples: 'secp256r1'
  7420. TLSCurveKey = attribute.Key("tls.curve")
  7421. // TLSEstablishedKey is the attribute Key conforming to the
  7422. // "tls.established" semantic conventions. It represents the boolean flag
  7423. // indicating if the TLS negotiation was successful and transitioned to an
  7424. // encrypted tunnel.
  7425. //
  7426. // Type: boolean
  7427. // RequirementLevel: Optional
  7428. // Stability: experimental
  7429. // Examples: True
  7430. TLSEstablishedKey = attribute.Key("tls.established")
  7431. // TLSNextProtocolKey is the attribute Key conforming to the
  7432. // "tls.next_protocol" semantic conventions. It represents the string
  7433. // indicating the protocol being tunneled. Per the values in the [IANA
  7434. // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
  7435. // this string should be lower case.
  7436. //
  7437. // Type: string
  7438. // RequirementLevel: Optional
  7439. // Stability: experimental
  7440. // Examples: 'http/1.1'
  7441. TLSNextProtocolKey = attribute.Key("tls.next_protocol")
  7442. // TLSProtocolNameKey is the attribute Key conforming to the
  7443. // "tls.protocol.name" semantic conventions. It represents the normalized
  7444. // lowercase protocol name parsed from original string of the negotiated
  7445. // [SSL/TLS protocol
  7446. // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
  7447. //
  7448. // Type: Enum
  7449. // RequirementLevel: Optional
  7450. // Stability: experimental
  7451. TLSProtocolNameKey = attribute.Key("tls.protocol.name")
  7452. // TLSProtocolVersionKey is the attribute Key conforming to the
  7453. // "tls.protocol.version" semantic conventions. It represents the numeric
  7454. // part of the version parsed from the original string of the negotiated
  7455. // [SSL/TLS protocol
  7456. // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
  7457. //
  7458. // Type: string
  7459. // RequirementLevel: Optional
  7460. // Stability: experimental
  7461. // Examples: '1.2', '3'
  7462. TLSProtocolVersionKey = attribute.Key("tls.protocol.version")
  7463. // TLSResumedKey is the attribute Key conforming to the "tls.resumed"
  7464. // semantic conventions. It represents the boolean flag indicating if this
  7465. // TLS connection was resumed from an existing TLS negotiation.
  7466. //
  7467. // Type: boolean
  7468. // RequirementLevel: Optional
  7469. // Stability: experimental
  7470. // Examples: True
  7471. TLSResumedKey = attribute.Key("tls.resumed")
  7472. // TLSServerCertificateKey is the attribute Key conforming to the
  7473. // "tls.server.certificate" semantic conventions. It represents the
  7474. // pEM-encoded stand-alone certificate offered by the server. This is
  7475. // usually mutually-exclusive of `server.certificate_chain` since this
  7476. // value also exists in that list.
  7477. //
  7478. // Type: string
  7479. // RequirementLevel: Optional
  7480. // Stability: experimental
  7481. // Examples: 'MII...'
  7482. TLSServerCertificateKey = attribute.Key("tls.server.certificate")
  7483. // TLSServerCertificateChainKey is the attribute Key conforming to the
  7484. // "tls.server.certificate_chain" semantic conventions. It represents the
  7485. // array of PEM-encoded certificates that make up the certificate chain
  7486. // offered by the server. This is usually mutually-exclusive of
  7487. // `server.certificate` since that value should be the first certificate in
  7488. // the chain.
  7489. //
  7490. // Type: string[]
  7491. // RequirementLevel: Optional
  7492. // Stability: experimental
  7493. // Examples: 'MII...', 'MI...'
  7494. TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain")
  7495. // TLSServerHashMd5Key is the attribute Key conforming to the
  7496. // "tls.server.hash.md5" semantic conventions. It represents the
  7497. // certificate fingerprint using the MD5 digest of DER-encoded version of
  7498. // certificate offered by the server. For consistency with other hash
  7499. // values, this value should be formatted as an uppercase hash.
  7500. //
  7501. // Type: string
  7502. // RequirementLevel: Optional
  7503. // Stability: experimental
  7504. // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC'
  7505. TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5")
  7506. // TLSServerHashSha1Key is the attribute Key conforming to the
  7507. // "tls.server.hash.sha1" semantic conventions. It represents the
  7508. // certificate fingerprint using the SHA1 digest of DER-encoded version of
  7509. // certificate offered by the server. For consistency with other hash
  7510. // values, this value should be formatted as an uppercase hash.
  7511. //
  7512. // Type: string
  7513. // RequirementLevel: Optional
  7514. // Stability: experimental
  7515. // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A'
  7516. TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1")
  7517. // TLSServerHashSha256Key is the attribute Key conforming to the
  7518. // "tls.server.hash.sha256" semantic conventions. It represents the
  7519. // certificate fingerprint using the SHA256 digest of DER-encoded version
  7520. // of certificate offered by the server. For consistency with other hash
  7521. // values, this value should be formatted as an uppercase hash.
  7522. //
  7523. // Type: string
  7524. // RequirementLevel: Optional
  7525. // Stability: experimental
  7526. // Examples:
  7527. // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0'
  7528. TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256")
  7529. // TLSServerIssuerKey is the attribute Key conforming to the
  7530. // "tls.server.issuer" semantic conventions. It represents the
  7531. // distinguished name of
  7532. // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6)
  7533. // of the issuer of the x.509 certificate presented by the client.
  7534. //
  7535. // Type: string
  7536. // RequirementLevel: Optional
  7537. // Stability: experimental
  7538. // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example,
  7539. // DC=com'
  7540. TLSServerIssuerKey = attribute.Key("tls.server.issuer")
  7541. // TLSServerJa3sKey is the attribute Key conforming to the
  7542. // "tls.server.ja3s" semantic conventions. It represents a hash that
  7543. // identifies servers based on how they perform an SSL/TLS handshake.
  7544. //
  7545. // Type: string
  7546. // RequirementLevel: Optional
  7547. // Stability: experimental
  7548. // Examples: 'd4e5b18d6b55c71272893221c96ba240'
  7549. TLSServerJa3sKey = attribute.Key("tls.server.ja3s")
  7550. // TLSServerNotAfterKey is the attribute Key conforming to the
  7551. // "tls.server.not_after" semantic conventions. It represents the date/Time
  7552. // indicating when server certificate is no longer considered valid.
  7553. //
  7554. // Type: string
  7555. // RequirementLevel: Optional
  7556. // Stability: experimental
  7557. // Examples: '2021-01-01T00:00:00.000Z'
  7558. TLSServerNotAfterKey = attribute.Key("tls.server.not_after")
  7559. // TLSServerNotBeforeKey is the attribute Key conforming to the
  7560. // "tls.server.not_before" semantic conventions. It represents the
  7561. // date/Time indicating when server certificate is first considered valid.
  7562. //
  7563. // Type: string
  7564. // RequirementLevel: Optional
  7565. // Stability: experimental
  7566. // Examples: '1970-01-01T00:00:00.000Z'
  7567. TLSServerNotBeforeKey = attribute.Key("tls.server.not_before")
  7568. // TLSServerSubjectKey is the attribute Key conforming to the
  7569. // "tls.server.subject" semantic conventions. It represents the
  7570. // distinguished name of subject of the x.509 certificate presented by the
  7571. // server.
  7572. //
  7573. // Type: string
  7574. // RequirementLevel: Optional
  7575. // Stability: experimental
  7576. // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com'
  7577. TLSServerSubjectKey = attribute.Key("tls.server.subject")
  7578. )
  7579. var (
  7580. // ssl
  7581. TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl")
  7582. // tls
  7583. TLSProtocolNameTLS = TLSProtocolNameKey.String("tls")
  7584. )
  7585. // TLSCipher returns an attribute KeyValue conforming to the "tls.cipher"
  7586. // semantic conventions. It represents the string indicating the
  7587. // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used
  7588. // during the current connection.
  7589. func TLSCipher(val string) attribute.KeyValue {
  7590. return TLSCipherKey.String(val)
  7591. }
  7592. // TLSClientCertificate returns an attribute KeyValue conforming to the
  7593. // "tls.client.certificate" semantic conventions. It represents the pEM-encoded
  7594. // stand-alone certificate offered by the client. This is usually
  7595. // mutually-exclusive of `client.certificate_chain` since this value also
  7596. // exists in that list.
  7597. func TLSClientCertificate(val string) attribute.KeyValue {
  7598. return TLSClientCertificateKey.String(val)
  7599. }
  7600. // TLSClientCertificateChain returns an attribute KeyValue conforming to the
  7601. // "tls.client.certificate_chain" semantic conventions. It represents the array
  7602. // of PEM-encoded certificates that make up the certificate chain offered by
  7603. // the client. This is usually mutually-exclusive of `client.certificate` since
  7604. // that value should be the first certificate in the chain.
  7605. func TLSClientCertificateChain(val ...string) attribute.KeyValue {
  7606. return TLSClientCertificateChainKey.StringSlice(val)
  7607. }
  7608. // TLSClientHashMd5 returns an attribute KeyValue conforming to the
  7609. // "tls.client.hash.md5" semantic conventions. It represents the certificate
  7610. // fingerprint using the MD5 digest of DER-encoded version of certificate
  7611. // offered by the client. For consistency with other hash values, this value
  7612. // should be formatted as an uppercase hash.
  7613. func TLSClientHashMd5(val string) attribute.KeyValue {
  7614. return TLSClientHashMd5Key.String(val)
  7615. }
  7616. // TLSClientHashSha1 returns an attribute KeyValue conforming to the
  7617. // "tls.client.hash.sha1" semantic conventions. It represents the certificate
  7618. // fingerprint using the SHA1 digest of DER-encoded version of certificate
  7619. // offered by the client. For consistency with other hash values, this value
  7620. // should be formatted as an uppercase hash.
  7621. func TLSClientHashSha1(val string) attribute.KeyValue {
  7622. return TLSClientHashSha1Key.String(val)
  7623. }
  7624. // TLSClientHashSha256 returns an attribute KeyValue conforming to the
  7625. // "tls.client.hash.sha256" semantic conventions. It represents the certificate
  7626. // fingerprint using the SHA256 digest of DER-encoded version of certificate
  7627. // offered by the client. For consistency with other hash values, this value
  7628. // should be formatted as an uppercase hash.
  7629. func TLSClientHashSha256(val string) attribute.KeyValue {
  7630. return TLSClientHashSha256Key.String(val)
  7631. }
  7632. // TLSClientIssuer returns an attribute KeyValue conforming to the
  7633. // "tls.client.issuer" semantic conventions. It represents the distinguished
  7634. // name of
  7635. // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
  7636. // the issuer of the x.509 certificate presented by the client.
  7637. func TLSClientIssuer(val string) attribute.KeyValue {
  7638. return TLSClientIssuerKey.String(val)
  7639. }
  7640. // TLSClientJa3 returns an attribute KeyValue conforming to the
  7641. // "tls.client.ja3" semantic conventions. It represents a hash that identifies
  7642. // clients based on how they perform an SSL/TLS handshake.
  7643. func TLSClientJa3(val string) attribute.KeyValue {
  7644. return TLSClientJa3Key.String(val)
  7645. }
  7646. // TLSClientNotAfter returns an attribute KeyValue conforming to the
  7647. // "tls.client.not_after" semantic conventions. It represents the date/Time
  7648. // indicating when client certificate is no longer considered valid.
  7649. func TLSClientNotAfter(val string) attribute.KeyValue {
  7650. return TLSClientNotAfterKey.String(val)
  7651. }
  7652. // TLSClientNotBefore returns an attribute KeyValue conforming to the
  7653. // "tls.client.not_before" semantic conventions. It represents the date/Time
  7654. // indicating when client certificate is first considered valid.
  7655. func TLSClientNotBefore(val string) attribute.KeyValue {
  7656. return TLSClientNotBeforeKey.String(val)
  7657. }
  7658. // TLSClientServerName returns an attribute KeyValue conforming to the
  7659. // "tls.client.server_name" semantic conventions. It represents the also called
  7660. // an SNI, this tells the server which hostname to which the client is
  7661. // attempting to connect to.
  7662. func TLSClientServerName(val string) attribute.KeyValue {
  7663. return TLSClientServerNameKey.String(val)
  7664. }
  7665. // TLSClientSubject returns an attribute KeyValue conforming to the
  7666. // "tls.client.subject" semantic conventions. It represents the distinguished
  7667. // name of subject of the x.509 certificate presented by the client.
  7668. func TLSClientSubject(val string) attribute.KeyValue {
  7669. return TLSClientSubjectKey.String(val)
  7670. }
  7671. // TLSClientSupportedCiphers returns an attribute KeyValue conforming to the
  7672. // "tls.client.supported_ciphers" semantic conventions. It represents the array
  7673. // of ciphers offered by the client during the client hello.
  7674. func TLSClientSupportedCiphers(val ...string) attribute.KeyValue {
  7675. return TLSClientSupportedCiphersKey.StringSlice(val)
  7676. }
  7677. // TLSCurve returns an attribute KeyValue conforming to the "tls.curve"
  7678. // semantic conventions. It represents the string indicating the curve used for
  7679. // the given cipher, when applicable
  7680. func TLSCurve(val string) attribute.KeyValue {
  7681. return TLSCurveKey.String(val)
  7682. }
  7683. // TLSEstablished returns an attribute KeyValue conforming to the
  7684. // "tls.established" semantic conventions. It represents the boolean flag
  7685. // indicating if the TLS negotiation was successful and transitioned to an
  7686. // encrypted tunnel.
  7687. func TLSEstablished(val bool) attribute.KeyValue {
  7688. return TLSEstablishedKey.Bool(val)
  7689. }
  7690. // TLSNextProtocol returns an attribute KeyValue conforming to the
  7691. // "tls.next_protocol" semantic conventions. It represents the string
  7692. // indicating the protocol being tunneled. Per the values in the [IANA
  7693. // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids),
  7694. // this string should be lower case.
  7695. func TLSNextProtocol(val string) attribute.KeyValue {
  7696. return TLSNextProtocolKey.String(val)
  7697. }
  7698. // TLSProtocolVersion returns an attribute KeyValue conforming to the
  7699. // "tls.protocol.version" semantic conventions. It represents the numeric part
  7700. // of the version parsed from the original string of the negotiated [SSL/TLS
  7701. // protocol
  7702. // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES)
  7703. func TLSProtocolVersion(val string) attribute.KeyValue {
  7704. return TLSProtocolVersionKey.String(val)
  7705. }
  7706. // TLSResumed returns an attribute KeyValue conforming to the "tls.resumed"
  7707. // semantic conventions. It represents the boolean flag indicating if this TLS
  7708. // connection was resumed from an existing TLS negotiation.
  7709. func TLSResumed(val bool) attribute.KeyValue {
  7710. return TLSResumedKey.Bool(val)
  7711. }
  7712. // TLSServerCertificate returns an attribute KeyValue conforming to the
  7713. // "tls.server.certificate" semantic conventions. It represents the pEM-encoded
  7714. // stand-alone certificate offered by the server. This is usually
  7715. // mutually-exclusive of `server.certificate_chain` since this value also
  7716. // exists in that list.
  7717. func TLSServerCertificate(val string) attribute.KeyValue {
  7718. return TLSServerCertificateKey.String(val)
  7719. }
  7720. // TLSServerCertificateChain returns an attribute KeyValue conforming to the
  7721. // "tls.server.certificate_chain" semantic conventions. It represents the array
  7722. // of PEM-encoded certificates that make up the certificate chain offered by
  7723. // the server. This is usually mutually-exclusive of `server.certificate` since
  7724. // that value should be the first certificate in the chain.
  7725. func TLSServerCertificateChain(val ...string) attribute.KeyValue {
  7726. return TLSServerCertificateChainKey.StringSlice(val)
  7727. }
  7728. // TLSServerHashMd5 returns an attribute KeyValue conforming to the
  7729. // "tls.server.hash.md5" semantic conventions. It represents the certificate
  7730. // fingerprint using the MD5 digest of DER-encoded version of certificate
  7731. // offered by the server. For consistency with other hash values, this value
  7732. // should be formatted as an uppercase hash.
  7733. func TLSServerHashMd5(val string) attribute.KeyValue {
  7734. return TLSServerHashMd5Key.String(val)
  7735. }
  7736. // TLSServerHashSha1 returns an attribute KeyValue conforming to the
  7737. // "tls.server.hash.sha1" semantic conventions. It represents the certificate
  7738. // fingerprint using the SHA1 digest of DER-encoded version of certificate
  7739. // offered by the server. For consistency with other hash values, this value
  7740. // should be formatted as an uppercase hash.
  7741. func TLSServerHashSha1(val string) attribute.KeyValue {
  7742. return TLSServerHashSha1Key.String(val)
  7743. }
  7744. // TLSServerHashSha256 returns an attribute KeyValue conforming to the
  7745. // "tls.server.hash.sha256" semantic conventions. It represents the certificate
  7746. // fingerprint using the SHA256 digest of DER-encoded version of certificate
  7747. // offered by the server. For consistency with other hash values, this value
  7748. // should be formatted as an uppercase hash.
  7749. func TLSServerHashSha256(val string) attribute.KeyValue {
  7750. return TLSServerHashSha256Key.String(val)
  7751. }
  7752. // TLSServerIssuer returns an attribute KeyValue conforming to the
  7753. // "tls.server.issuer" semantic conventions. It represents the distinguished
  7754. // name of
  7755. // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of
  7756. // the issuer of the x.509 certificate presented by the client.
  7757. func TLSServerIssuer(val string) attribute.KeyValue {
  7758. return TLSServerIssuerKey.String(val)
  7759. }
  7760. // TLSServerJa3s returns an attribute KeyValue conforming to the
  7761. // "tls.server.ja3s" semantic conventions. It represents a hash that identifies
  7762. // servers based on how they perform an SSL/TLS handshake.
  7763. func TLSServerJa3s(val string) attribute.KeyValue {
  7764. return TLSServerJa3sKey.String(val)
  7765. }
  7766. // TLSServerNotAfter returns an attribute KeyValue conforming to the
  7767. // "tls.server.not_after" semantic conventions. It represents the date/Time
  7768. // indicating when server certificate is no longer considered valid.
  7769. func TLSServerNotAfter(val string) attribute.KeyValue {
  7770. return TLSServerNotAfterKey.String(val)
  7771. }
  7772. // TLSServerNotBefore returns an attribute KeyValue conforming to the
  7773. // "tls.server.not_before" semantic conventions. It represents the date/Time
  7774. // indicating when server certificate is first considered valid.
  7775. func TLSServerNotBefore(val string) attribute.KeyValue {
  7776. return TLSServerNotBeforeKey.String(val)
  7777. }
  7778. // TLSServerSubject returns an attribute KeyValue conforming to the
  7779. // "tls.server.subject" semantic conventions. It represents the distinguished
  7780. // name of subject of the x.509 certificate presented by the server.
  7781. func TLSServerSubject(val string) attribute.KeyValue {
  7782. return TLSServerSubjectKey.String(val)
  7783. }
  7784. // Attributes describing URL.
  7785. const (
  7786. // URLDomainKey is the attribute Key conforming to the "url.domain"
  7787. // semantic conventions. It represents the domain extracted from the
  7788. // `url.full`, such as "opentelemetry.io".
  7789. //
  7790. // Type: string
  7791. // RequirementLevel: Optional
  7792. // Stability: experimental
  7793. // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2',
  7794. // '[1080:0:0:0:8:800:200C:417A]'
  7795. // Note: In some cases a URL may refer to an IP and/or port directly,
  7796. // without a domain name. In this case, the IP address would go to the
  7797. // domain field. If the URL contains a [literal IPv6
  7798. // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by
  7799. // `[` and `]`, the `[` and `]` characters should also be captured in the
  7800. // domain field.
  7801. URLDomainKey = attribute.Key("url.domain")
  7802. // URLExtensionKey is the attribute Key conforming to the "url.extension"
  7803. // semantic conventions. It represents the file extension extracted from
  7804. // the `url.full`, excluding the leading dot.
  7805. //
  7806. // Type: string
  7807. // RequirementLevel: Optional
  7808. // Stability: experimental
  7809. // Examples: 'png', 'gz'
  7810. // Note: The file extension is only set if it exists, as not every url has
  7811. // a file extension. When the file name has multiple extensions
  7812. // `example.tar.gz`, only the last one should be captured `gz`, not
  7813. // `tar.gz`.
  7814. URLExtensionKey = attribute.Key("url.extension")
  7815. // URLFragmentKey is the attribute Key conforming to the "url.fragment"
  7816. // semantic conventions. It represents the [URI
  7817. // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
  7818. //
  7819. // Type: string
  7820. // RequirementLevel: Optional
  7821. // Stability: stable
  7822. // Examples: 'SemConv'
  7823. URLFragmentKey = attribute.Key("url.fragment")
  7824. // URLFullKey is the attribute Key conforming to the "url.full" semantic
  7825. // conventions. It represents the absolute URL describing a network
  7826. // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
  7827. //
  7828. // Type: string
  7829. // RequirementLevel: Optional
  7830. // Stability: stable
  7831. // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
  7832. // '//localhost'
  7833. // Note: For network calls, URL usually has
  7834. // `scheme://host[:port][path][?query][#fragment]` format, where the
  7835. // fragment is not transmitted over HTTP, but if it is known, it SHOULD be
  7836. // included nevertheless.
  7837. // `url.full` MUST NOT contain credentials passed via URL in form of
  7838. // `https://username:password@www.example.com/`. In such case username and
  7839. // password SHOULD be redacted and attribute's value SHOULD be
  7840. // `https://REDACTED:REDACTED@www.example.com/`.
  7841. // `url.full` SHOULD capture the absolute URL when it is available (or can
  7842. // be reconstructed). Sensitive content provided in `url.full` SHOULD be
  7843. // scrubbed when instrumentations can identify it.
  7844. URLFullKey = attribute.Key("url.full")
  7845. // URLOriginalKey is the attribute Key conforming to the "url.original"
  7846. // semantic conventions. It represents the unmodified original URL as seen
  7847. // in the event source.
  7848. //
  7849. // Type: string
  7850. // RequirementLevel: Optional
  7851. // Stability: experimental
  7852. // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv',
  7853. // 'search?q=OpenTelemetry'
  7854. // Note: In network monitoring, the observed URL may be a full URL, whereas
  7855. // in access logs, the URL is often just represented as a path. This field
  7856. // is meant to represent the URL as it was observed, complete or not.
  7857. // `url.original` might contain credentials passed via URL in form of
  7858. // `https://username:password@www.example.com/`. In such case password and
  7859. // username SHOULD NOT be redacted and attribute's value SHOULD remain the
  7860. // same.
  7861. URLOriginalKey = attribute.Key("url.original")
  7862. // URLPathKey is the attribute Key conforming to the "url.path" semantic
  7863. // conventions. It represents the [URI
  7864. // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
  7865. //
  7866. // Type: string
  7867. // RequirementLevel: Optional
  7868. // Stability: stable
  7869. // Examples: '/search'
  7870. // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when
  7871. // instrumentations can identify it.
  7872. URLPathKey = attribute.Key("url.path")
  7873. // URLPortKey is the attribute Key conforming to the "url.port" semantic
  7874. // conventions. It represents the port extracted from the `url.full`
  7875. //
  7876. // Type: int
  7877. // RequirementLevel: Optional
  7878. // Stability: experimental
  7879. // Examples: 443
  7880. URLPortKey = attribute.Key("url.port")
  7881. // URLQueryKey is the attribute Key conforming to the "url.query" semantic
  7882. // conventions. It represents the [URI
  7883. // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
  7884. //
  7885. // Type: string
  7886. // RequirementLevel: Optional
  7887. // Stability: stable
  7888. // Examples: 'q=OpenTelemetry'
  7889. // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when
  7890. // instrumentations can identify it.
  7891. URLQueryKey = attribute.Key("url.query")
  7892. // URLRegisteredDomainKey is the attribute Key conforming to the
  7893. // "url.registered_domain" semantic conventions. It represents the highest
  7894. // registered url domain, stripped of the subdomain.
  7895. //
  7896. // Type: string
  7897. // RequirementLevel: Optional
  7898. // Stability: experimental
  7899. // Examples: 'example.com', 'foo.co.uk'
  7900. // Note: This value can be determined precisely with the [public suffix
  7901. // list](http://publicsuffix.org). For example, the registered domain for
  7902. // `foo.example.com` is `example.com`. Trying to approximate this by simply
  7903. // taking the last two labels will not work well for TLDs such as `co.uk`.
  7904. URLRegisteredDomainKey = attribute.Key("url.registered_domain")
  7905. // URLSchemeKey is the attribute Key conforming to the "url.scheme"
  7906. // semantic conventions. It represents the [URI
  7907. // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
  7908. // identifying the used protocol.
  7909. //
  7910. // Type: string
  7911. // RequirementLevel: Optional
  7912. // Stability: stable
  7913. // Examples: 'https', 'ftp', 'telnet'
  7914. URLSchemeKey = attribute.Key("url.scheme")
  7915. // URLSubdomainKey is the attribute Key conforming to the "url.subdomain"
  7916. // semantic conventions. It represents the subdomain portion of a fully
  7917. // qualified domain name includes all of the names except the host name
  7918. // under the registered_domain. In a partially qualified domain, or if the
  7919. // qualification level of the full name cannot be determined, subdomain
  7920. // contains all of the names below the registered domain.
  7921. //
  7922. // Type: string
  7923. // RequirementLevel: Optional
  7924. // Stability: experimental
  7925. // Examples: 'east', 'sub2.sub1'
  7926. // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If
  7927. // the domain has multiple levels of subdomain, such as
  7928. // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`,
  7929. // with no trailing period.
  7930. URLSubdomainKey = attribute.Key("url.subdomain")
  7931. // URLTemplateKey is the attribute Key conforming to the "url.template"
  7932. // semantic conventions. It represents the low-cardinality template of an
  7933. // [absolute path
  7934. // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
  7935. //
  7936. // Type: string
  7937. // RequirementLevel: Optional
  7938. // Stability: experimental
  7939. // Examples: '/users/{id}', '/users/:id', '/users?id={id}'
  7940. URLTemplateKey = attribute.Key("url.template")
  7941. // URLTopLevelDomainKey is the attribute Key conforming to the
  7942. // "url.top_level_domain" semantic conventions. It represents the effective
  7943. // top level domain (eTLD), also known as the domain suffix, is the last
  7944. // part of the domain name. For example, the top level domain for
  7945. // example.com is `com`.
  7946. //
  7947. // Type: string
  7948. // RequirementLevel: Optional
  7949. // Stability: experimental
  7950. // Examples: 'com', 'co.uk'
  7951. // Note: This value can be determined precisely with the [public suffix
  7952. // list](http://publicsuffix.org).
  7953. URLTopLevelDomainKey = attribute.Key("url.top_level_domain")
  7954. )
  7955. // URLDomain returns an attribute KeyValue conforming to the "url.domain"
  7956. // semantic conventions. It represents the domain extracted from the
  7957. // `url.full`, such as "opentelemetry.io".
  7958. func URLDomain(val string) attribute.KeyValue {
  7959. return URLDomainKey.String(val)
  7960. }
  7961. // URLExtension returns an attribute KeyValue conforming to the
  7962. // "url.extension" semantic conventions. It represents the file extension
  7963. // extracted from the `url.full`, excluding the leading dot.
  7964. func URLExtension(val string) attribute.KeyValue {
  7965. return URLExtensionKey.String(val)
  7966. }
  7967. // URLFragment returns an attribute KeyValue conforming to the
  7968. // "url.fragment" semantic conventions. It represents the [URI
  7969. // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component
  7970. func URLFragment(val string) attribute.KeyValue {
  7971. return URLFragmentKey.String(val)
  7972. }
  7973. // URLFull returns an attribute KeyValue conforming to the "url.full"
  7974. // semantic conventions. It represents the absolute URL describing a network
  7975. // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)
  7976. func URLFull(val string) attribute.KeyValue {
  7977. return URLFullKey.String(val)
  7978. }
  7979. // URLOriginal returns an attribute KeyValue conforming to the
  7980. // "url.original" semantic conventions. It represents the unmodified original
  7981. // URL as seen in the event source.
  7982. func URLOriginal(val string) attribute.KeyValue {
  7983. return URLOriginalKey.String(val)
  7984. }
  7985. // URLPath returns an attribute KeyValue conforming to the "url.path"
  7986. // semantic conventions. It represents the [URI
  7987. // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component
  7988. func URLPath(val string) attribute.KeyValue {
  7989. return URLPathKey.String(val)
  7990. }
  7991. // URLPort returns an attribute KeyValue conforming to the "url.port"
  7992. // semantic conventions. It represents the port extracted from the `url.full`
  7993. func URLPort(val int) attribute.KeyValue {
  7994. return URLPortKey.Int(val)
  7995. }
  7996. // URLQuery returns an attribute KeyValue conforming to the "url.query"
  7997. // semantic conventions. It represents the [URI
  7998. // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component
  7999. func URLQuery(val string) attribute.KeyValue {
  8000. return URLQueryKey.String(val)
  8001. }
  8002. // URLRegisteredDomain returns an attribute KeyValue conforming to the
  8003. // "url.registered_domain" semantic conventions. It represents the highest
  8004. // registered url domain, stripped of the subdomain.
  8005. func URLRegisteredDomain(val string) attribute.KeyValue {
  8006. return URLRegisteredDomainKey.String(val)
  8007. }
  8008. // URLScheme returns an attribute KeyValue conforming to the "url.scheme"
  8009. // semantic conventions. It represents the [URI
  8010. // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component
  8011. // identifying the used protocol.
  8012. func URLScheme(val string) attribute.KeyValue {
  8013. return URLSchemeKey.String(val)
  8014. }
  8015. // URLSubdomain returns an attribute KeyValue conforming to the
  8016. // "url.subdomain" semantic conventions. It represents the subdomain portion of
  8017. // a fully qualified domain name includes all of the names except the host name
  8018. // under the registered_domain. In a partially qualified domain, or if the
  8019. // qualification level of the full name cannot be determined, subdomain
  8020. // contains all of the names below the registered domain.
  8021. func URLSubdomain(val string) attribute.KeyValue {
  8022. return URLSubdomainKey.String(val)
  8023. }
  8024. // URLTemplate returns an attribute KeyValue conforming to the
  8025. // "url.template" semantic conventions. It represents the low-cardinality
  8026. // template of an [absolute path
  8027. // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2).
  8028. func URLTemplate(val string) attribute.KeyValue {
  8029. return URLTemplateKey.String(val)
  8030. }
  8031. // URLTopLevelDomain returns an attribute KeyValue conforming to the
  8032. // "url.top_level_domain" semantic conventions. It represents the effective top
  8033. // level domain (eTLD), also known as the domain suffix, is the last part of
  8034. // the domain name. For example, the top level domain for example.com is `com`.
  8035. func URLTopLevelDomain(val string) attribute.KeyValue {
  8036. return URLTopLevelDomainKey.String(val)
  8037. }
  8038. // Describes user-agent attributes.
  8039. const (
  8040. // UserAgentNameKey is the attribute Key conforming to the
  8041. // "user_agent.name" semantic conventions. It represents the name of the
  8042. // user-agent extracted from original. Usually refers to the browser's
  8043. // name.
  8044. //
  8045. // Type: string
  8046. // RequirementLevel: Optional
  8047. // Stability: experimental
  8048. // Examples: 'Safari', 'YourApp'
  8049. // Note: [Example](https://www.whatsmyua.info) of extracting browser's name
  8050. // from original string. In the case of using a user-agent for non-browser
  8051. // products, such as microservices with multiple names/versions inside the
  8052. // `user_agent.original`, the most significant name SHOULD be selected. In
  8053. // such a scenario it should align with `user_agent.version`
  8054. UserAgentNameKey = attribute.Key("user_agent.name")
  8055. // UserAgentOriginalKey is the attribute Key conforming to the
  8056. // "user_agent.original" semantic conventions. It represents the value of
  8057. // the [HTTP
  8058. // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
  8059. // header sent by the client.
  8060. //
  8061. // Type: string
  8062. // RequirementLevel: Optional
  8063. // Stability: stable
  8064. // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU
  8065. // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
  8066. // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0
  8067. // grpc-java-okhttp/1.27.2'
  8068. UserAgentOriginalKey = attribute.Key("user_agent.original")
  8069. // UserAgentVersionKey is the attribute Key conforming to the
  8070. // "user_agent.version" semantic conventions. It represents the version of
  8071. // the user-agent extracted from original. Usually refers to the browser's
  8072. // version
  8073. //
  8074. // Type: string
  8075. // RequirementLevel: Optional
  8076. // Stability: experimental
  8077. // Examples: '14.1.2', '1.0.0'
  8078. // Note: [Example](https://www.whatsmyua.info) of extracting browser's
  8079. // version from original string. In the case of using a user-agent for
  8080. // non-browser products, such as microservices with multiple names/versions
  8081. // inside the `user_agent.original`, the most significant version SHOULD be
  8082. // selected. In such a scenario it should align with `user_agent.name`
  8083. UserAgentVersionKey = attribute.Key("user_agent.version")
  8084. )
  8085. // UserAgentName returns an attribute KeyValue conforming to the
  8086. // "user_agent.name" semantic conventions. It represents the name of the
  8087. // user-agent extracted from original. Usually refers to the browser's name.
  8088. func UserAgentName(val string) attribute.KeyValue {
  8089. return UserAgentNameKey.String(val)
  8090. }
  8091. // UserAgentOriginal returns an attribute KeyValue conforming to the
  8092. // "user_agent.original" semantic conventions. It represents the value of the
  8093. // [HTTP
  8094. // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent)
  8095. // header sent by the client.
  8096. func UserAgentOriginal(val string) attribute.KeyValue {
  8097. return UserAgentOriginalKey.String(val)
  8098. }
  8099. // UserAgentVersion returns an attribute KeyValue conforming to the
  8100. // "user_agent.version" semantic conventions. It represents the version of the
  8101. // user-agent extracted from original. Usually refers to the browser's version
  8102. func UserAgentVersion(val string) attribute.KeyValue {
  8103. return UserAgentVersionKey.String(val)
  8104. }
  8105. // The attributes used to describe the packaged software running the
  8106. // application code.
  8107. const (
  8108. // WebEngineDescriptionKey is the attribute Key conforming to the
  8109. // "webengine.description" semantic conventions. It represents the
  8110. // additional description of the web engine (e.g. detailed version and
  8111. // edition information).
  8112. //
  8113. // Type: string
  8114. // RequirementLevel: Optional
  8115. // Stability: experimental
  8116. // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) -
  8117. // 2.2.2.Final'
  8118. WebEngineDescriptionKey = attribute.Key("webengine.description")
  8119. // WebEngineNameKey is the attribute Key conforming to the "webengine.name"
  8120. // semantic conventions. It represents the name of the web engine.
  8121. //
  8122. // Type: string
  8123. // RequirementLevel: Optional
  8124. // Stability: experimental
  8125. // Examples: 'WildFly'
  8126. WebEngineNameKey = attribute.Key("webengine.name")
  8127. // WebEngineVersionKey is the attribute Key conforming to the
  8128. // "webengine.version" semantic conventions. It represents the version of
  8129. // the web engine.
  8130. //
  8131. // Type: string
  8132. // RequirementLevel: Optional
  8133. // Stability: experimental
  8134. // Examples: '21.0.0'
  8135. WebEngineVersionKey = attribute.Key("webengine.version")
  8136. )
  8137. // WebEngineDescription returns an attribute KeyValue conforming to the
  8138. // "webengine.description" semantic conventions. It represents the additional
  8139. // description of the web engine (e.g. detailed version and edition
  8140. // information).
  8141. func WebEngineDescription(val string) attribute.KeyValue {
  8142. return WebEngineDescriptionKey.String(val)
  8143. }
  8144. // WebEngineName returns an attribute KeyValue conforming to the
  8145. // "webengine.name" semantic conventions. It represents the name of the web
  8146. // engine.
  8147. func WebEngineName(val string) attribute.KeyValue {
  8148. return WebEngineNameKey.String(val)
  8149. }
  8150. // WebEngineVersion returns an attribute KeyValue conforming to the
  8151. // "webengine.version" semantic conventions. It represents the version of the
  8152. // web engine.
  8153. func WebEngineVersion(val string) attribute.KeyValue {
  8154. return WebEngineVersionKey.String(val)
  8155. }