|
30 | 30 | methods |
31 | 31 |
|
32 | 32 | function counter = createCounter(obj, ctname, ctdescription, ctunit) |
| 33 | + % CREATECOUNTER Create a counter |
| 34 | + % C = CREATECOUNTER(M, NAME) creates a counter with the specified |
| 35 | + % name. A counter's value can only increase but not |
| 36 | + % decrease. |
| 37 | + % |
| 38 | + % C = CREATECOUNTER(M, NAME, DESCRIPTION, UNIT) also |
| 39 | + % specifies a description and a unit. |
| 40 | + % |
| 41 | + % See also CREATEUPDOWNCOUNTER, CREATEHISTOGRAM |
33 | 42 | arguments |
34 | 43 | obj |
35 | 44 | ctname |
|
38 | 47 | end |
39 | 48 | import opentelemetry.common.mustBeScalarString |
40 | 49 | ctname = mustBeScalarString(ctname); |
41 | | - % cpp-opentelemetry end does not allow string input with spaces, |
42 | | - % replace any spaces with underscores as a temporary fix |
43 | 50 | ctdescription = mustBeScalarString(ctdescription); |
44 | 51 | ctunit = mustBeScalarString(ctunit); |
45 | 52 | id = obj.Proxy.createCounter(ctname, ctdescription, ctunit); |
|
50 | 57 |
|
51 | 58 |
|
52 | 59 | function updowncounter = createUpDownCounter(obj, ctname, ctdescription, ctunit) |
| 60 | + % CREATEUPDOWNCOUNTER Create an UpDownCounter |
| 61 | + % C = CREATEUPDOWNCOUNTER(M, NAME) creates an UpDownCounter |
| 62 | + % with the specified name. An UpDownCounter's value can |
| 63 | + % increase or decrease. |
| 64 | + % |
| 65 | + % C = CREATEUPDOWNCOUNTER(M, NAME, DESCRIPTION, UNIT) also |
| 66 | + % specifies a description and a unit. |
| 67 | + % |
| 68 | + % See also CREATECOUNTER, CREATEHISTOGRAM |
53 | 69 | arguments |
54 | 70 | obj |
55 | 71 | ctname |
|
59 | 75 |
|
60 | 76 | import opentelemetry.common.mustBeScalarString |
61 | 77 | ctname = mustBeScalarString(ctname); |
62 | | - % cpp-opentelemetry end does not allow string input with spaces, |
63 | | - % replace any spaces with underscores as a temporary fix |
64 | 78 | ctdescription = mustBeScalarString(ctdescription); |
65 | 79 | ctunit = mustBeScalarString(ctunit); |
66 | 80 | id = obj.Proxy.createUpDownCounter(ctname, ctdescription, ctunit); |
|
71 | 85 |
|
72 | 86 |
|
73 | 87 | function histogram = createHistogram(obj, hiname, hidescription, hiunit) |
| 88 | + % CREATEHISTOGRAM Create a histogram |
| 89 | + % H = CREATEHISTOGRAM(M, NAME) creates a histogram with the specified |
| 90 | + % name. A histogram aggregates values into bins. Bins can be |
| 91 | + % customized using a View object. |
| 92 | + % |
| 93 | + % H = CREATEHISTOGRAM(M, NAME, DESCRIPTION, UNIT) also |
| 94 | + % specifies a description and a unit. |
| 95 | + % |
| 96 | + % See also CREATECOUNTER, CREATEUPDOWNCOUNTER, |
| 97 | + % OPENTELEMETRY.SDK.METRICS.VIEW |
74 | 98 | arguments |
75 | 99 | obj |
76 | 100 | hiname |
|
80 | 104 |
|
81 | 105 | import opentelemetry.common.mustBeScalarString |
82 | 106 | hiname = mustBeScalarString(hiname); |
83 | | - % cpp-opentelemetry end does not allow string input with spaces, |
84 | | - % replace any spaces with underscores as a temporary fix |
85 | 107 | hidescription = mustBeScalarString(hidescription); |
86 | 108 | hiunit = mustBeScalarString(hiunit); |
87 | 109 | id = obj.Proxy.createHistogram(hiname, hidescription, hiunit); |
|
0 commit comments