Good morning, and welcome to the ninth meeting of the local government housing and planning committee in 2022. I would ask all members and witnesses to ensure that their mobile phones are on silent and that all other notifications are turned off during the meeting. Graham Day is joining us remotely for today's meeting. The first item on our agenda is to decide whether to take item eight in private. Item eight is consideration of the evidence that we have taken on the non-domestic rates coronavirus Scotland bill. Are we all agreed? Everyone is in agreement. Now we turn to agenda item two, which is to take evidence on the non-domestic rates coronavirus Scotland bill at stage one. We are joined remotely for this session by the Minister for Public Finance, Planning and Community Wealth, who is accompanied by Scottish Government officials Sandra Reid, who is a bill team leader, and David Smith, who is the lawyer. I welcome our witnesses to the meeting. As all of our witnesses are appearing remotely, I would be grateful if Mr Arthur could make it clear if he wishes for one of his officials to respond to a specific point. Before I open up the sessions to questions, would the minister like to make a short opening statement? I would be grateful for the opportunity, convener. Thank you very much. Good morning to the committee and thank you for the opportunity to participate remotely this morning. The aim of the bill is to ensure fairness for all ratepayers. Members may recall when I gave evidence on 16 November 2021 for the valuation and rating coronavirus Scotland order 2021, I commented that subordinate legislation could only apply to the period on or after 1 April 2021 and that, to go back further, would require primary legislation. The bill builds on that order and extends similar provisions to matters arising on or after 2 April 2020, by ruling that the effect of coronavirus on or after 2 April 2020 cannot be considered when calculating a property's rateable value or net annual value in the current valuation role. The significance of that date is that it aligns with the date from which the definition of material change of circumstances was clarified by the non-domestic rate Scotland Act 2020. The bill provides clarity and consistency to ratepayers on that policy. Typically, material change of circumstance has been used to reflect either physical changes to a property such as an extension or demolition, or certain major changes in a specific area such as the tramworks in Edinburgh. The intention with that change in definition was to reflect recent case law and move to a three-year revaluation cycle by restricting the circumstances in which general economic factors can be regarded as being relevant to a change in valuation. Since the start of the coronavirus pandemic, more than 40,000 non-domestic properties have been appealed on the basis that there has been an MCC. Given the timing, it is likely that those appeals were lodged as a result of the pandemic. The Scottish Government is of the view that economic changes to rateable values resulting from Covid-19 should be considered at revaluation and not under the MCC provisions. When the impact across all properties will be taken into account, that is a view shared by the UK, the Welsh Government and Northern Ireland. That ensures fairness to all rate players by ensuring that any effect of Covid-19 is considered for all properties at the next revaluation in 2023, rather than through the use of the MCC provisions. The bill under discussion today provides that in calculating the annual values or the rateable value in relation to any property in the 2017 valuation goal. No account can be taken of any matter arising on or after second year for 2020 that is directly or indirectly attributable to coronavirus. The bill does not apply to changes to the physical state of a property or where a property should or should not be included in the valuation goal, for instance if someone started working from home as a result of the pandemic. Although appeals have been submitted for over 40,000 properties for 2019-20, that is less than a fifth of all non-domestic properties in Scotland. As the Federation of Small Businesses has pointed out previously, not many small businesses are among them. Ris may reflect our generous existing support package for small businesses, but it likely also reflects that well-resourced, professionally advised property owners and occupiers are more likely to know about material change of circumstances and provisions and probably therefore have appealed. Meanwhile, a number of large and multi-national firms that have been largely unaffected or potentially even successful during the pandemic have made appeals against their properties. As was discovered during evidence sessions for the order, there is a disconnect between how Covid has felt to businesses and how it has impacted rents in the commercial property market. This is a hugely complex issue and the outcome is uncertain. It cannot be assumed that those appeals would be successful or their outcome fair. We believe that the right time for market-wide economic changes to be reflected is at revaluation. We have strengthened revaluations following the independent public review of non-domestic rates to ensure that they more closely reflect market circumstances. Firstly, we increased the frequency of revaluations from five to three years and reduced the time between the tone date and revaluation. Secondly, with the support of your predecessor committee, we delayed the next revaluation by one year to 2023 and also brought forward that commitment to a one-year tone date, which will be 1 April 2022. Both measures have been universally welcomed by the business community in Scotland. Covid-19 has had a major impact on the economy and we responded swiftly and on an unprecedented scale to support businesses throughout the pandemic. We introduced 100 per cent retail, hospitality, leisure and aviation relief in 2020-21, and we are the first Government to confirm a full extension for this relief for 2021-22. In 2022-23, we responded to a key ask from the business community to prevent a cliff edge return to full liability on 31 March 2022. For businesses in the retail, leisure and hospitality sectors, we are continuing relief at 50 per cent for the first three months of 2022-23, capped at £27,500 per rate pair. In the start of the pandemic, businesses have benefited from £4.5 billion of support, which includes £1.6 billion of Covid-related reliefs. We acted quickly to support the business community when it needed it most and continue to support businesses through the pandemic. Before closing, convener, I would like to highlight one parallel development. As stated, more than 40,000 appeals were launched following the outbreak of the pandemic. The committee, when considering the order, previously raised with me the issue of workload around those appeals. Appeals lodged between 1 January 2020 and 31 March 2021 currently have a disposal deadline of 31 December 2022. That is the date at which all appeals lodged between those dates required to be heard. Valuation appeal committee is required to provide appellants with a minimum 105-day notice period and any request for a referral to the Land's Tribunal for Scotland by one party to an appeal, which is often used for complex cases, would have to be done by the end of June. While the bill will provide clarity for rate pairs, I have been clear that it does not remove the right of appeal. It will be for appellants to decide whether they want to pursue or withdraw their Covid appeals. As I am sure the committee will appreciate, appellants may not feel that they are in a sufficiently informed position to take such a decision until Parliament has finished its scrutiny of the bill. For this reason, we intend to shortly lay legislation to extend the disposal deadline beyond 31 December 2022 by one further year. In closing, I would return to my opening comments that the bill seeks to ensure fairness for all Scottish rate pairs, while maintaining the integrity of the non-domestic rate system, as well as the stability of Scottish public finances. On that, convener, I will conclude and look forward to any questions that the committee may have. Thank you very much, minister. I thank you for highlighting the parallel development and your intention to lay legislation in that regard. I now open up the session for questions, and I would like to begin by asking what is the main driver for this bill? Is it the protection of public finances or managing the volume of appeals relating to coronavirus? As I attempted to convey when I was in front of the committee in November last year, we sought to clarify the definition of material change of circumstance in the non-domestic rate of Scotland Act 2020. That seeks to further clarify what we mean by material change of circumstance, and that is the primary driver for the bill that provides that clarity and certainty for the users of the non-domestic rate system. However, of course, public finances are a consideration, and the financial memorandum illustrates particular scenarios and the potential impact on public finances. Of course, where that materialised, that would have to be factored into however the manager and budget year in and year out. However, the key point that I want to come back to is that, fundamentally, there is uncertainty about the outcome of material change of circumstances, both in terms of duration of appeals and any potential outcome and any potential impact that it could have for ratepayers or, indeed, public finances. Effectively, the reasons that I gave for the introduction of the order back in November apply to this bill. I am conscious that it is stage 1 that we consider the general principle of legislation. I agree to the order that was before Parliament in November. There has been a recognition of that general principle of the need to clarify and be at and provide certainty on what material change of circumstances is for, which is for clearly delineated local specifics next to circumstances. In that broader considerations around the general economy, we are best captured through revaluation, which is why we have a revaluation. We need these changes to the revaluation process from a cycle of five years down to three years and a tone day that precedes revaluation by a single year. Ensuring that revaluation means that rateable values and annual values are more reflective of the market at the time that they are introduced. I hope that that helps to clarify what the intent behind the bill is. I thank you very much for that. That is a very helpful clarification. Does the Scottish Government hold the view that successful appeals would be unlikely to prove effective in targeting support to those businesses that are affected by coronavirus? I think that, given the unpredictable national order, there is no guarantee that any outcomes would be fair. I think that that is a point that we can all agree on. I think that the approach to supporting businesses that the Scottish Government has taken over the past two years of the pandemic has been one that has sought to focus on delivering support to where it is needed most. As I stated, we are provided in the region of £4.5 billion of support to businesses in Scotland. That is over £400 million more than what we received in consequentials from the UK Government. Indeed, as recently as December, we had announced the £375 million package to support in the wake of the Omicron variant emerging. Indeed, that has been delivered in Tronshies, the last of which was the £80 million of discretion to support. It is now going to be available for local government to administer within the area in particular. That allows for a much more bespoke, entailered and needs-based approach to business support. With MCC appeals, it is not only a question of unpredictability but the timescales as well. We have been focused on getting support to businesses as quickly as possible. I thank you very much for that response. I am now going to bring in Graham Day with questions, and he is joining us online. Thank you, convener. Good morning, minister. When this committee considered the secondary legislation related to this, a number of stakeholders raised concerns about what it considered to be a lack of consultation prior to the introduction of that secondary legislation. That was reflected in the committee's report. In fact, the committee sought to encourage the Government to take the opportunity afforded by the bill to undertake further consultation with stakeholders around the proposed legislation. However, we are told by some stakeholders that there still was no specific consultation undertaking relation to the bill, and some stakeholders have raised the issue of the lack of a Bria committee in that. I wonder how you would respond to those criticisms. As you will be aware, we indicated our intention to act in this in late June. That preceded the order that went before Parliament in the autumn. In that intervening period, there was extensive consultation, which my colleagues the cabinet secretary, Kate Forbes, my ministerial colleague, Mr McKee and myself undertook, where we met and engaged thoroughly with all of the major business representatives of organisations across Scotland. I think that I may not be certainly correctly conveyed at the committee that this was not an issue that was raised as a priority. Indeed, following that, there was the consideration of the order in which Parliament took extensive evidence, oral and written evidence, which I was able to respond to in questions to the committee in November. Through that particular process, as well as the fact that we announced in the programme for government that we would bring forward primary legislation in year 1 and a reiterated commitment at committee in November, we have been very clear on what it is that we are doing. We have continued some regular engagement with business, but in the intervening period between announcing our intention to act on the NCC and the order being considered by Parliament, we had extensive engagement with the business committee. That was not an issue that was certainly, in my experience, raised to any meaningful extent. Can I ask the minister if you feel that the matters that were covered by the bill were covered in that extensive dialogue that Kate Forbes and I and McKee were having with businesses? Yes, I do. There was not an opportunity for them to be covered within that dialogue, and the other point that I would say is that, given effectively what the bill is doing, it is effectively what the order that was considered, given that, seriously, taking the day back for the year 2020, there has been that opportunity for consultation and engagement, both in terms of direct engagement between ministers and business and representative organisations, but also, importantly, between the Parliament and considering that order. I am confident that there has been sufficient opportunity for that engagement and consultation to take place through that extensive process that I have outlined, both between Government and business and, indeed, between Parliament and business. That has provided opportunities for issues to be aired and to be considered, and I am confident that there has, as I said, been that opportunity for business to feed into the process. What about the absence of a brea? This is ultimately about clarifying an existing provision that is in place, which was within the non-domestic race act 2020. Effectively, what we sought to do with the order was to clarify what that provision actually meant in practice and what we are doing with this legislation is effectively. What we could not do through subordinate legislation alone is to bring the day back. The important point to note is that the date that this legislation refers to is the date when that power came into force in the 2020 act. Effectively, what we are seeking to do here is to clarify and, of course, the non-domestic race act would use an opportunity at that particular point to consider all of the policy intentions there. Effectively, what the order did and what the bill is doing is just seeking to provide greater clarity and uncertainty, which I would assume is something that would be welcomed. I am now going to bring in Paul MacLennan with questions. One of the key things that has been raised by stakeholders is the retrospective aspect of the legislation. I know that it has been mentioned by the Scottish Chamber of Commerce, the CBRE, around that. Do you recognise the concerns of the stakeholders in regard to the retrospective aspect of the legislation? It is important, and it is an appointment that I think has a preference to the line of questioning that Mr Davies is saying just a moment ago. Is that this legislation does not remove any existing appeal rights? Appeal rights are impacted. What it is seeking to do is to provide certainty and clarity around the definition of material change in circumstances. That policy intent was clear when Parliament passed the NDR Act 2020. As I said, the order made that we passed in the autumn and what the bill is doing is providing clarity. With regards to being retrospective, it is not removing any appeal rights. What it is doing is providing clarity around the definition of what a material change of circumstance is. Of course, it is for individual appellants to consider whether or not they wish to appeal or to remove appeal or to withdraw their appeal. That does not change. That is just around providing clarity around the definition of the NCC. Just on that as well, I suppose, I mean, would retrospective changes be considered again if the circumstances justified that and would still be the same approach? I know that it is kind of hard to forecast a future sort of thing, but if that did happen again, would there be a different approach, just like a different approach, or would this be considered again going forward? As I said, any provisions that are retrospective have to be given very careful consideration. What informs our approach to tax is our tax framework, which we published alongside the budget. I think that that gives the best overview of how we would seek to proceed, and part of that is to have continuous engagement in dialogue, as well as being underpinned by the Adamson principles. That informs our approach to taxation. As for any unknown unknowns and future hypotheticals, I would not want to speculate other than to say that decisions around taxation policy are informed by and will be consistent with what we have set out in the tax framework. I am now going to bring in Megan Gallacher with questions. Thank you, convener. Good morning, minister and panel. I also refer members to my register of interests, as I am a servant councillor in North Lanarkshire, continuing with the theme of principles of taxation. While the Scottish Government's proposed approach goes against the principles of certainty and stakeholder engagement, the reason I am asking that is because the committee has previously raised concerns regarding that. I would like to seek assurances from the Government this morning that those principles will underpin future settings of non-domestic rates policy, so can I ask the minister if he could provide the assurances? I am very happy to, Ms Gallacher. I say that around the regard to consultation stakeholder engagement, I have sought to address that in response to Mr Day, with regard to certainty. That is at the very heart of what the bill is seeking to do. With regard to how we go forward, as I may reference to my opening remarks, one of the key asks of businesses, the key ask around non-domestic rates ahead of the budget, was to avoid that cliff edge on the 31st of March. That is exactly what we did with the RHL 50 per cent relief for the first three months. Between the certainty that the bill provides, the engagement that took place between announcing of intention and the order, and the current non-domestic rates policy for the forthcoming financial year, which has been informed by the key ask of business, demonstrates that, on engagement and on providing certainty, the Government is committed to being consistent with the principles that are outlined in the tax framework. You raised in your opening statement that you are aware of concerns that have been repeatedly raised around pressure on the assessor workforce. We have heard in evidence of difficulties from the Scottish Assessors Association on recruiting staff to deal with the revaluation. I just wanted to ask Minister if you think that assessor offices are adequately resourced to deal with that revaluation. I think that on that question of resource that helps to inform the decision that I made reference to in my remarks with regard to the legislation that we will be laying shortly, pretending to the disposal date, because it will help to provide the opportunity for appellants to consider the progress of the bill through the Parliament and whether that or not that informs their future decisions, but also helps to address the issue of pressures that are being faced by assessors. We are taking the approach, as I said, with the subordinate legislation that we will be bringing forward, which to allow more time for appellants and users of the system to consider the position in light of how Parliament progresses the bill, but that is a knock-on effect that will help to support assessors in freeing up resource, because I want to recognise that we are coming up with our tone date in a few weeks' time, two weeks' time and a revaluation process under way. I take the point that you make regarding resource and capacity for assessors, that is why I took the opportunity to inform the committee of the legislation that will be bringing forward, which will support assessors in terms of capacity management. I appreciate the minister letting the committee know about that extension to the deadline date by year. Does he think that that will mean that appeals will essentially be smoothed out over that longer period and give assessors more time to deal with those appeals, or if he thinks that it will simply move the backlog date a year later and that assessors' office will still be feeling that workload pressure a year further down the line? It is a fair question that you asked, Mr Griffin. What we have to say is that we have to recognise the independence of assessors and VAX in that regard. Ultimately, how they choose to manage their workload and how they choose to proceed is a massive amount of independent assessors, but we have sought to help us in moving and extending that deadline by year. There is no longer that statutory requirement for disposal by the end of this year, because, as I made references to my opening march, a deadline of 31 December, given the 105 days' notice for citation having been needed to refer to last year by the end of June, the deadline may be the first of December, but it is only three months away, or three and a half months away from the end of June, in that regard. It creates more immediate and approximate pressure. We have, by extending the deadline, taken to give that increased capacity and space, so to speak, for assessors, but with regard to how they manage their workload and how the valuation of fuel committees operate. That is a matter for them. As independent bodies, I do not think that it would be appropriate for me to say anything. As a minister, it could be misconstrued as calling share how they carry out their functions independently. I just wanted to ask briefly whether you have any concerns over workload pressure to any appeals that would predate the second of April 2020. I recognise that that is a point that has been conveyed by the committee. I recognise that the key point of the second of April is to be consistent with what was in the 2020 act. The point that I have sought to make in response to all the questions that I have answered this morning is that the legislation is about providing clarity and certainty. That is why it is very important that it aligns with the second of April 2020 that was in the bill. I recognise that there may be concerns. I think that the reasoning and rationale behind the second of April is very important, and that is why that day is in the bill. It is before us today. Thank you. I am now going to bring in Miles Briggs. Thank you, convener. Good morning minister. Good morning to your panel as well. Thank you for joining us. I wanted to ask a question with regards to targeted business support. I just wondered how effectively support for businesses has been targeted in response to the pandemic. What information does the Scottish Government specifically have on businesses that have fallen outside that criteria of support? Thank you, Mr Briggs. It is a good question. I think that I suppose that the heart of it and answering that has to be a recognition that it has not been possible to help every single business. Of course, we are, to an extent, restricted by the mechanisms at our disposal for getting money out of the door. One of the ways that we are solicited to address that is through the discretionary funding that we have provided to local government. I made reference to the latest transfer of £80 million, which local government will have in discussion. I think that that ultimately affects our recognition that it is that local knowledge that councils have and can bring to bear in supporting businesses. We have also sought, through other mechanisms as well, such as Scotland, lots of local funding to provide support for businesses more generally and at localities. I think that the key point that we have come back to is that we have had a total of £4.5 billion, £1.6 billion of reliefs were responded to the big and key aspect of the business, which was to provide the cliff edge in 31 March. Obviously, it covers a range of reliefs that are specifically delivered through the NDAS system in the past two financial years, which have been extensive. Obviously, we are addressing the ask in the coming financial year to avoid the cliff edge. There are various business support grants that have been in operation across the pandemic. At the final point, there is a discretionary money available for local authorities in the most recent tranches, £80 million, which they will have discretion in how they are supplied to their own areas. I hope that there is an overview of the support that has been provided and how it relates to what we have done on NDR relief. Thank you for that. It sounds like your postman's might be arrived or something. Could I further to that ask in terms of local authorities in handing down the powers to distribute that? What monitoring took place around that, specifically here in Edinburgh, for example, high number of hotel and bed and breakfast businesses and how that support was then monitored to see that it would actually get into the hands of those most needing it for different types of businesses specifically? I do not have the details in front of me. We do, of course. We have published on a Scottish Government website and most up-to-date statistics on the delivery of resources. Of course, local government provides returns on their spending for statistical analysis and monitoring from the Scottish Government. In terms of how funding is agreed with local government through COSLA, the £80 million of the subject of principles agreements about what was trying to be achieved there. Whether it be through the publications on overall business support, monitoring the return from local government or the principles agreements that we have with COSLA and allocating funding, there is a range of ways in which monitoring is the point of driving at Mr Biggs of ensuring that he might get to those who need it so that we can have it and start. One of the reasons that our counterparts in the UK Government decided to also not allow the appeals process based on Covid reasons was that it had put up £1.5 billion of the business rate support fund, which, as I remember, was announced in the 25th of March last year, the day after this Parliament went into recess for the election. Scotland's share of that support fund was to be £145 million. The committee raised that issue several times over the course of the year. Has that money been received and what are our plans to deploy it to support business in Scotland? That consequential is contingent upon the passing of the UK Act, which is taking place since I was last in front of the committee on this matter. That funding is included and committed as part of the budget process for the forthcoming year. What we have undertaken to do is not to wait but to provide support in advance. We had the £375 million of support that I referenced previously in Omicron. The key point that I would come back to is that, overall, our spending on business support is to £4.5 billion. That is over £400 million more than we have received in consequentials. Even including the money that should be fair, we have went above and beyond what is allocated to us via UK consequentials and support businesses. The most recent element of that is how it has been distributed. Overall, it is the recent £80 million to local authorities, which I touched on earlier. We have not hung about working to get the money out of business as and where it is needed. Through a range of methods, whether that has been granced in support for specific sectors such as wholesale or taxi drivers, but also through discretionary funding for local authorities, which they can then use to support businesses in a narrow area and a way that they think is most appropriate. I appreciate that, but it sounds to me that that money is still assumed that it has not been receded yet into the Scottish Government. The money has materialised part of the budget process, but, without getting into the intricacies and complexities of the budget process overall, we have found ourselves, as you will be aware, in quite a challenge in situations. I do not want to draw any direct correlations between the MCC money and other parts of the budget, because it is quite complex. If you take, for example, the resources that we were anticipating at supplementary estimates towards the end of last year and then to the early part of this year, we have seen a situation in which we have received less than we had anticipated. Beyond that, we were led to believe that we were receiving additional money to support cost of living, but we did not receive additional cost of living money. We had to find that, the £290 million that worked from within money that we had already previously had committed because, fundamentally, we have had a situation where the UK Government has given us an indication of money that is going to come. The money is less, and then there are new commitments that have to be made from that particular money, which we had not been led to believe that we would have to be met from that money, i.e., cost of living. You take an example. We expected to get £841 million of stock, so that was down to £827 million, if I remember correctly. Out of that, rather than getting £290 million of additional for cost of living, we have got to take back £290 million from that £827 million. This is something that we explored at the finance committee last week in string budget revision, but it is just to give you an example of the complexity that is involved at this particular point of the year around the budget. The key point that I want to come back to is that we have delivered significantly more in business sport than what we have received in consequentials, and we have worked to get that money out of the door as quickly as possible and as effectively as possible to the businesses who need it. Just until that is finally clarified or otherwise, I presume that the Scottish Government will continue to press for that consequential to be transferred to Scotland. Well, just to be clear, the consequential has understood that it was contingent upon the bill passing. That consequential has now been transferred and it has been incorporated into our existing spending plans, so it has just worked to be clear on that, Mr Corthy. The point that I am making overall is that it is important to look at the money that is made available to us via the Barnett formula. It has to be seen in a broader context. With Barnett, you have to look at what the net amount is, and sometimes there can be a particular budget line that is identified as increasing, but the actual net amount is reducing because of reduction in other budget lines, so it can create a complex set of circumstances in which to operate. The key point that I want to make is that, for that money that has been received as part of the budget process, the key message that I want to convey is that we have went above and beyond what we received in business support consequentials. We have spent £4.5 billion, and that includes in the money that we have delivered, a range of measures from tailored packages of support for particular sectors, from the 100 per cent RHL relief that we had in previous financial year and this financial year. We are delivering the 50 per cent relief in RHL for the first three months of the next financial year to avoid the cliff edge. We have also delivered that support for local government, £80 million for discretionary support as well. RHL, sector-specific grants, discretionary funding for local government, have delivered it in a range of ways that we have went above and beyond the resource that was allocated to us, including the MCC consequentials to which you refer. Thanks very much for that, minister, thank you. I think that we have come to the end of our question, so can I thank the witnesses for their evidence on the bill today? I now suspend the meeting briefly to allow a changeover of supporting officials. We now turn to agenda item 3, which is to take evidence on the non-domestic rates valuation role, modification, Scotland regulations 2022 from the Minister for Public Finance, Planning and Community Wealth. Mr Arthur is joined for this session by Scottish Government officials Anouk Berthier, NDR Policy Lead and Susan Rob Lawyer. I welcome our witnesses to the meeting. Before I open up to questions from the committee, I now invite Mr Arthur to make a short opening statement. Thank you, convener. This draft instrument under consideration today is purely technical and is attended to assist councillors in administering the business growth accelerator relief. PGA relief, which is unique in the UK, provides 100 per cent relief on new properties for 12 months after they are first occupied and 100 per cent relief for 12 months on property improvements. In order to facilitate the identification of eligible properties by councils, the non-domestic rates Scotland Act 2020 requires that the assessor put a mark on the valuation role to flag new and improved properties. We keep all our reliefs under review and in response to stakeholder feedback, PGA relief was expanded a number of times since the non-domestic rates act was passed. The draft instrument that we are discussing today merely takes that into account and aligns the definition of new and improved properties in this act with those properties that might be eligible for PGA relief from 1 April 2022. That will enable local authorities to distinguish the properties that are eligible for the relief. Those regulations specifically clarify that property improvements include concurrent change of use in the property or where there are improvements associated with the installation of certain plant and machinery, including the installation of store cells or store panels. The business growth accelerator is a flagship relief that has been praised by the business community and it was even highlighted in response to the UK Government's recent review as a policy that should be replicated in England. I would note for the committee's benefit that the UK Government has chosen to replicate it with a relief only for property improvements from 2023. The business growth accelerator relief in Scotland has been available not only to property improvements but also to new builds since 2018. The fact could be that I will conclude and I hope that members will support the instrument today. Thank you very much Minister for just outlining the purpose of this SSI. Do any members of the committee have questions for the minister? No one has any questions. I thank the minister and his officials for the evidence today. We now turn to agenda item 4, which is consideration of the motion on the instrument. I invite the minister to move motion S6M-02982 that the local government housing and planning committee recommends that a non-domestic rates valuation modification Scotland regulations be approved. Do members have any further questions for the minister? The question is that motion S6M-02982, in the name of Tom Arthur, be approved. Are we all agreed? We are all agreed. We now turn to agenda item 3, which is to take evidence on the non-domestic rates valuation role. I am glad to see Graham that you have managed to join us. Thank you for that. The committee will publish its report on the instrument after the meeting. I now suspend briefly to allow a changeover of supporting officials before we move to agenda item 5. We now turn to agenda item 5, which is to take evidence on the local authority, capital finance and accounting, Scotland coronavirus amendment regulations 2022 from the Minister for Public Finance Planning and Community Wealth. Mr Arthur is joined for this item by Scottish Government officials Eleanor Davies, who is the head of local authority accounting and, once again, David Smith, who is a lawyer. I welcome our witnesses to the meeting and, before I open up to questions from the committee, I invite Mr Arthur to make a short opening statement. Last year, amendment regulations were laid in response to the financial pressures that are faced by local authorities as a result of the pandemic. The Scottish Government worked jointly with the Convention of Scottish Local Authorities to identify ways for a local Government to address the funding pressure. The amendments sought in the 2021 regulations allowed a local authority to reduce the amount of any of the statutory repayments that were due to make to the statutory loan funds in either the financial year 2021 or 2021-22, but not both. That would reduce the expenditure of a local authority in that financial year, thus creating additional financial capacity to meet Covid-19 costs. Given the on-going challenges of responding to the pandemic, COSLA requested a further one-year extension to that flexibility to allow a local authority to reduce repayments to the statutory loan funds in 2022-23. Again, councils can only make use of that flexibility in one of the financial years. Most did not use that flexibility in either 2021 or 2021-22, but have indicated that the nature used to use that flexibility in 2022-23. Under normal circumstances, that is not something that ministers would support. Requiring the repayments to be made in the financial year that they are due is prudent financial management. It ensures that both current and future taxpayers charge for their share of the capital expenditure costs of assets being used to deliver services. However, those are not normal circumstances, and it seems right to allow the flexibility to be extended by the amendments that are made in those regulations. However, we have made it clear to local government that that flexibility should only be used as necessary to address funding pressures arising from the pandemic and may not be used to grow reserves. The 2021 regulations also include a provision to ensure that future changes to loans, fund accounting arrangements can be delivered through statutory guidance rather than requiring further amendments to regulations. That change, which was due to come into force on 1 April 2022, is to allow future harmonisation between accounting standards and statutory arrangements. In order to facilitate the extension to the loans on repayment flexibility, those regulations also defer by one year the effect of that provision in the 2021 regulations. Separately, the regulations also change the audit completion deadline for local government 2021-22 annual accounts, as requested by Audit Scotland, to address the continuing challenges as a result of the delay in auditing the 2019-20 and the 2020-21 accounts. Both Audit Scotland and councils are keen to return to the original statutory deadlines for 2022-23. In summary, those regulations provide a financial flexibility that has been asked for by local authorities and will be welcomed by local authorities. The extension of the audit deadline will alleviate some of the strain on council staff auditors. In fact, I will conclude and encourage the committee to support the instrument. Thank you, minister, for laying out the purpose of the amendment regulations. Do members have any questions for the minister? No questions. I thank the minister and his officials for evidence today. We now turn to agenda item 6, which is consideration of the motion on the instrument. I invite the minister to move motion S6M-02977 that the local government housing and planning committee recommends that the local authority, capital finance and accounting Scotland coronavirus amendment regulations 2022 be approved. The question is that motion S6M-02977 in the name of Tom Arthur be approved. Are we all agreed? The committee will publish its report on the instrument after the meeting. We now turn to agenda item 7, which is consideration of the following negative instruments, non-domestic rates coronavirus relief Scotland regulations 2022, non-domestic rates loving and miscellaneous amendment Scotland regulations 2022, non-domestic rates relief for new and improved properties Scotland regulations 22, non-domestic rates unoccupied property Scotland amendment regulations 2022. There is no requirement for the committee to make any recommendations on negative instruments. Do any members have any comments on the instruments? Is the committee agreed that we do not wish to make any recommendations in relation to the instruments? We agreed at the start of the meeting to take the next item in private as we have no more public business today and I now close the public part of the meeting.


I want to take a tour of a low-pressure system and take a look at some of the different features so you can see how they fit together with a real weather system on real weather maps. We'll start at the surface. This is a surface analysis from 12Z on February 13, 2014. There was a 997-millibar low-pressure system along the east coast right along the North Carolina-Virginia border. This was a fairly significant storm which dropped over two feet of snow in parts of the mid-Atlantic region. Heavy snow extended up into New England with localized blizzard conditions. To the south of the surface low, we have this blue line with blue triangles. That's the cold front signaling the leading edge of advancing colder air. Out ahead of it, in the warm sector, we often have a maritime tropical air mass which is warm and humid. Behind it, we have an advancing colder air mass, commonly continental polar or even continental arctic. And we can see some huge temperature contrasts here. To the east of Florida, temperatures are in the 70s on some of these station models. Behind the front in northern Florida, we have temperatures in the 30s so much colder air is arriving behind that cold front. To the east of the low, the red line with red semi-circles marks the warm front. That signals the boundary between retreating colder air to the north and advancing warmer air in the warm sector. It's the retreat of that cold air that actually allows the warm air to advance. So we have a maritime tropical air mass advancing northward while colder, denser air north of the warm front slowly retreats. Now let's fast forward six hours to 18Z and the low is even stronger now, around 991 millibars. The center of the low has moved northward off the Delaware coast and we just see the very beginning of an occluded front forming. It's hard to see but the beginning of the occluded front signals that the low is starting to reach maturity. The cold front is trailing southward offshore while the warm front extends toward the east. So let's look at this mature low pressure system on the corresponding enhanced infrared satellite image. To get your bearings, the greens, blues and purples represent cold high cloud tops. This cyclone has a classic comma signature to it, signaling that it's a mature mid-tatt latitude cyclone. To the north of the warm front, we generally have upward motion from overrunning as the warm air glides over the dense cool air near the surface, which often results in a large area of layered clouds, which is what we see north of the warm front. These clouds near the northern edge of the cloud shield are quite high and cold, but a look at the corresponding visible image shows that they seem to be relatively thin, which fits what we would expect. We often have thin high cirrus and cirro stratus clouds well north of the warm front, thicker alto stratus clouds as we get a little closer to the warm front, followed by thick stratus and nimbo stratus clouds close to the warm front. Switching back to the enhanced infrared, we see that along and just ahead of the cold front, we have a thinner band of clouds, which is indicative of the showery weather that typically accompanies cold frontal passages. Satellite imagery also lets us get a handle on this low conveyor belt, and for that, we'll turn to water vapor imagery. To get your bearings, here's the east coast of the United States, and here's our cyclone. This stream of water vapor and clouds ushering moist air northward, which eventually overruns the colder air mass north of the warm front, is the warm conveyor belt. Meanwhile, the cold conveyor belt travels under the warm conveyor belt north of the warm front, and rises as it wraps around the cyclone to create the clouds in the comma head. Finally, we can see evidence of the dry conveyor belt too. It helps to find the western edge of the comma head as dry air aloft marked by this dark ribbon here sinks from aloft around the western edge of the storm and wraps around the storm to form the dry slot. Finally, here's the corresponding radar image. Unfortunately, we can't see much of the precipitation with this mid-latitude cyclone because of the showers and storms along the cold front, along with much of the stratiform overrunning precipitation north of the warm front, was outside of the range of land-based radars. Although you can see a bit of the overrunning precipitation off the New England coast. But we can get a good look at the wrap-around precipitation associated with the cold conveyor belt, which is bringing snow from New England down through Pennsylvania and even into Virginia and North Carolina, even though remember the surface low was off the Delaware coast.


Hello, everyone. Welcome to Cloud Native Live, where we dive into the code behind Cloud Native.  So, every week, we bring a new set of presenters to show you how to work with Cloud Native Technologies. They will build things, they will break things, and they will answer all of your questions. So, you can join us every Wednesday to watch live. So, this week, we have Jessica here with us to talk about open telemetry. And as always, this is an official live stream of the CNCF, and as such, it is subject to the CNCF Code of Conduct. So, please do not add anything to the chat or questions that would be in violation of that Code of Conduct. Basically, please be respectful of all of your fellow participants as well as presenters. So, with that done, I'll hand it over to Jessica to kick off today's presentation. Thanks. Yes. Hi, I'm Jessica Tron. I am currently in developer relations at Honeycomb, but I'm a software developer of 20 years, and development is what I care about. And today, today I have a program that I want to change. It's just this script that I wrote like a Christmas time last year for this cute little Christmas activity, and I want to make it more general. So now I want to kind of mature it into something more generally useful than just exactly one thing. And in order to do that, I need to like refactor it and make it more configurable, but it doesn't have any tests. I wrote it for fun. I didn't write tests. And so, it's really hard to refactor things without tests because you never know when you break something. And yeah, you could like make a small change and then run it again and see if the output's okay. But that's so tedious. Also, it's hard to write tests for because it's like a visual thing. It invokes randomness. It uses stuff relative to the current time. So, we'd have to like pull all those things out of the functions that are like reading the file system and reading the clock and calling ran. I'd have to put all that out to make it have deterministic tests at all. And that would be a big refactoring. But I can't refactor because I don't have tests. So, one way out of this loop that I think is going to be really useful is to use tracing instead of tests as the feedback loop of what is my refactoring doing. This is fun in a couple ways. One, it's going to be useful in production. Well, such as production is with a script that you run on your computer. But in other code, if you practice this, those traces will still be useful in production. They'll be useful every time I work on this program in the future. And the other reason is it actually makes something change with my refactoring. So, my goal today is to add some tracing and see something that I want to refactor and then refactor it and see the results in the traces. Even though it's not externally visible, the program is just still working, the traces are supposed to change as the internals of our program change, sometimes, as we choose. And so, that's going to be the feedback loop. Okay, Annie, can I share my screen? What do I need to do? Oh, there it is. Okay, okay, right, so here's my little main.ts. This program already has open telemetry configured for reasons that will become apparent, but it doesn't have tracing around its functionality yet. So, when in doubt, always do the thing and then see what it doesn't do and then make a change. So, I can run it in local mode where it's sending telemetry to a local collector and a Jaeger instance. And then, I can go over to Jaeger and what I'm looking for, Jaeger UI, find traces, is a span with a top-level main. It doesn't have a main, there's only this one trace. And if I click on this, you're going to see what this program actually does. So, what this program actually does is output a trace with pictures in it. Let me shrink this a little. And you can see, can you tell that that's supposed to be, it's actually supposed to be a Christmas ornament. And this is supposed to be a Christmas tree. And there's another ornament, another ornament, or whatever kind of ball-like thing you want that to be. Smaller tree, ornament, bigger, right. So, it draws pictures in the traces. It does some other stuff. And at the very end, hopefully I'll have time to pop over to Honeycomb and show you the entertaining things that this program does with open telemetry spans that aren't visible in Jaeger. But for now, it's enough to see in here that it's still working. It's still making trees and baubles inside the trace. See this little line that's a span event that's supposed to be a sparkle. Right. But we're not getting traces from the program describing its own execution. And that's what I want to start doing before I refactor. Yeah. And we're getting a few comments from the audience with the screens looking a bit blurred. Just to let you know, the audience is what we try to troubleshoot it and make it less blurred. We could not get it fully working as we would have liked to, but it is the best that we could do at the moment. So I hope it's working for everyone, but if there's something that you would like for us to zoom in, for example, more or something, let us know. But yeah, let's hope it works. We can also do this for you. Branch name, add tracing live. So if you want, let's see. If you go to, I'll just open it on here. If you want the code, it's available at honey. GitHub.com slash honey.com.io slash happy Olly days where Olly is 011Y. And it's the add tracing live branch. That's where I'm working from right now. If you want to go look at it yourself. And someday I'll have to figure out how to get restreamed to show my screen differently. But that could be, that could be ours. I did make the resolution a lot bigger or yeah. Yeah, I worked really well. The differences is better than the first time. Okay, cool. Right. So this one, this is a batch script. You run it from the command line, like clear it's dot slash run local. It's the wrapper and it prints some stuff and it makes a cow. Come here, cow. There's the cow. And then it makes that trace that we saw in Yeager with the pictures in it. That's its game. Because it's a script and not like a long running. It's a program like a web application. I have to explicitly start the SDK and wait for that to complete before I do any operation that could create a trace.  And then after that, I have to explicitly call SDK shutdown before the program exits or it just won't send all the traces at the end. So that's something to know about tracing in a batch job or script. Something that's not a web app that runs forever. So now to add a trace at all, I'm going to wrap this main call in a trace and let's see, do I have a tracer yet? I don't have a tracer. So let's get one const tracer equals hotel dot trace dot get tracer. We'll name it main.js because that's the file we're in. Now I can say tracer dot start active span. You have to say start. I'm in JavaScript. I'm in Node. You have to say start active span, not just start span. That's important because if you want your child, your span that you create to ever have children, it has to become the active span. And the problem with that is that in order to have an active span, you have to put all the code, the unit of work that's going to be inside that span in a callback, bummer callbacks. And the callback receives the span as an argument. So we can call from there, we can get main. Main is an asynchronous function. It's returning a promise. So after main completes, then I can say s dot end. You have to end the span yourself. And today you're going to see the travails of adding tracing, parts of it are easy, parts of it are hard. Mostly if you know how it's working, then you're fine. That's kind of asking a lot too. Oh, and I'm going to be careful here. And since this is going to be the root span of my program, I want to be sure that it's transmitted, even if an exception happens inside the program. So here's my unfulfilled function. Receive nothing and the span. I'm also going to pass an unrejected function, which is going to get an error. And then I'm going to record the exception on the span and end it. Okay. So now instead of just calling main, I'm calling main inside an active span. And I end that span. It doesn't get sent until you call end. So it's really important to call end in order to get a span. All right. Let's run this. Unlocal. And this time I expect to go to Yeager and see a whole new trace. Oops. Okay. I passed the wrong thing to record exception. It's not telling you that in here, whatever. Okay. Record exception. Okay. That makes sense. Thank you, TypeScript. Okay. This time it ran the same. Go over to Yeager and see if we got a new trace. Find traces. All right. We have one with 552 spans. That's going to be like the one that it created with pictures in it, but we also have a trace with a single span and its name is main. And that's what I wanted. Okay. There it is. It's a main span. It's not very exciting. But it's a starting point. Okay. The next thing to do is what auto instrumentation can I add? Because this is no, there's got to be some automatic instrumentation that I can add to find out, kind of spy on what this program is doing. And that's going to tell me something about the program I'm modifying, as well as giving me a starting point for this bands that I can use to describe my refactoring. Okay. I need to know what libraries this project uses. I guess I could look in the package.json. I could also grep or import in source slash start up to yes. But I want to exclude local imports. Grab dash v. So I'm excluding quote dot. Okay. Clear. Do that again. No. Grab again. There we go. All right. At the top here, and it's not super clear. Can make it even bigger. Don't know if that helps. At the top here, it says import Axios from Axios. All right. So Axios is an HTTP client. I'm using that to call out with HTTP calls. That's something I'd want to track. Okay. PNGJS, that's obscure. That's not going to have auto instrumentation. And the file system, that looks useful. And then I have open telemetry. And then I have file system again. Open telemetry, open telemetry, open telemetry. And the word important. Okay. So I want auto instrumentation for Axios and file system. And when I want auto instrumentation, I always go to open telemetry.io slash registry. Registry. And then I scroll down until I find the search box. And then I type Axios. No matches found. Dun, dun, dun. What do we have for node? So if I look at JavaScript and type instrumentation. And I look at that. Okay. I can get the whole list of JavaScript implementation. And I did this yesterday. And I looked and looked for something that would be relevant because I'm like, well, if Axios is an instrument, so I could use a different library that is. And here I found HTTP instrumentation. And HTTP is like the built in library that does network calls. And Axios is going to use that under the hood. So this is actually going to give me what I want. So I click on that and I get these experimental packages. And it tells me this stuff. And I know what to do now. So I'm going to install that auto instrumentation. And then great. I'm going to add it to my tracing configuration. Here's my tracing configuration. I have set the logging to tell me if something's wrong. And I have the SDK set up with a batch processor where I've like upped the limits on everything because generally the libraries try not to interfere with the functioning of your program. But in this case, open telemetry is the functioning of this program. So I'm like, please, yes, use my memory. But then I don't have any instrumentations. So let's add those instrumentations, array, new HTTP. Did I import it yet? I did not import HTTP instrumentation from instrumentation HTTP. And now it will like me. And we will instantiate a new one. Those pass it into the SDK. And let's see if anything's different. All right. Run local again. Send to the local Yeager thinking about it. Let's take it a few seconds. You know what? I bet this tracing might even tell us how to make it faster. Yeager, hit back. Find traces again to get the most recent ones. Aha. This one, zoom in again. This one has four spans. So when I click on that, aha. So here's my main span. And here's an HTTP get and another one and another one. So I can see that we're making three network calls in this app. If I click into these and click into the tags and dig and dig and dig, I can find that the target here is the off end point at Honeycomb. So it's this program calls into Honeycomb to be like, hey, who is this person? Where am I going to put this data? And then the next one is going to a data sets end point for Happy Ollie Days. And the third one is going to, aha, off again. So the first one and third one here are duplicates. And I could definitely shave 270 milliseconds off the execution of this program by saving the output of the first get call here. So that's one thing to learn. That's cool. Let's try adding a file system. Instrumentation. So for the file system instrumentation, I go back to the registry and look for the file system. Ah, fs instrumentation fs is built in node library for file system. And this should tell me how to use it. Yes, it says require instrumentation fs and new fs instrumentation. So let's go through that game again. Open telemetry instrumentation fs. Installs that. And then we go to tracing.ts and this is something. This one gives me a lot of value for a little bit of typing. Instrumentation. And then we'll add it to the array here and we'll have two auto instrumentations. And that's going to do a lot. Two auto instrumentations. Run it again. And then we'll go look at Yeager and see what files this this is opening. Yeager back. Fine traces. And there's a big one and a small one. I want the small one. No, I don't want the small one. I want it to be bigger than that. One span, four spans. I don't have it yet. Maybe if I hit find traces again. Oh wait, here's one of 51 spans. Let's try that one. Oh, okay. So here's our main and look at all this at this real path sync, whatever that means stat sync, read file sync, blah, blah, blah, read file sync, read file sync, read file sync. Okay. So we're doing a whole lot of synchronous file reads. What file are we reading? I click on one of those spans and I click into the tags. It tells me nothing. It tells me nothing. This auto instrumentation is unsatisfactory. It doesn't tell me what file it's reading. It's got an internal span format, a library name, a library version, a span dot kind, and then all the process level stuff, which is the same for every span in this trace. So that's a bummer. If I do want to find out what files it's reading, and I also find it interesting how scattered the file reads are. For my purposes of making this configurable, I'm probably going to want to move those closer to the beginning of the operation of the program. Okay. So I can't really modify the auto instrumentation. That would be hard. But I can put spans around the read file syncs that I'm doing. I go over to VS code and I look for read file sync. I find, not marked down. That doesn't matter. Okay. I find image.ts and song.ts. Okay. And then we also have a question. Oh, yeah. So they ask, do you guys have any representatives for doing the same on our end? Yeah. If you want to look at the code for this example, it's at, I have that open over here. Nope. That's open telemetry. That's open telemetry. Honeycomb IO slash happy holidays is currently where this code is. In general, I'm using a zillion open telemetry projects.  And if you want this particular example of using it, that's available on GitHub too. And Carlo, I'm sorry. I can't make restream work better for the screen clarity. Someday I'll try. But that's out of like 10 minutes. Right. I'm on a Mac pro. This is not a weird computer. Anyway. So there's two places that this read file sync occurs. Do you all want to do the easy one or the hard one? Do you want to like make progress quickly? Or do you want to see, um, see adding tracing the hard? I will take the first response. Let's see what you can say. My gut feeling would be the hard way. That's always more entertaining way. But let's see. Does anyone else agree with me or not? A little bit. Yeah. So thank you a lot for the links that you provided. So that's helping. Okay. Well, if nobody has an opinion, or maybe there's just a bit of delay, then I, oh, oh, okay. Rob G says the hard way. All right. The hard way it is. We'll start with the hard way. So here in song.ts, like maybe, maybe it's this one. We probably are going to need to instrument both of them. But okay. Here we go. We have our read file sync. So what I want to do is wrap the body of the function in a start active span. To do that, I need a tracer. I have a shortcut for that. Get tracer. So we will get tracer named song.ts because that's the file name. And that's my personal preference. I need to get this file name onto a spam. Okay. So normally what I do is I use my spam shortcut. And I'm like return tracer dot start active span. It's immediately angry because this is a constructor. So I can't return anything. Oh, okay. Well, that's fine. I'll just wrap. Oops. Name the span. Just a span song. I'll just wrap here. I need to put inside this function before the span dot end, the body of the constructor in this case. So I'll just move that up. Hit save for the formatting. And type script is angry. Property versus has no initializer and is definitely not assigned to the constructor. Well, we have the bane of every JavaScript program, which is the word this. And this is not in fact this once I put it inside this callback. So frustrating. I fought with this for a while earlier and gave up and did the easy one and it turned out to be useful. But I think in general what I need to do here is actually put this stuff in utility function. Function read. File. I'll name. And then we'll just paste this stuff in here, but instead of sticking in this, we'll return it. Okay. And then. If I call read file. Read file with the file name. Instead of. Instead of putting that file read directly in the constructor, I think that's going to work better. Because specifically once it's in a function, I'm no longer doing anything with this. Now I can do the standard. Method of wrapping the body of the function in start active span. Oops, I forgot to name it. Name it. Read file for song. All right. And then I'll scoot the end of the function down here. Oh, s dot n needs to be right before the return. Hmm. But I don't like that we're doing a bunch of this stuff after the span. So I'm going to stick it in our results is this and then end the span and then return the result that way. If this operation takes some time, it'll be incorporated in the span. Okay. And now the whole point of that, which was to add an attribute to the span, set attribute app dot file name, and we'll set that to the file name. Now I expect at least some of my read file syncs, not all of them to have another span on top of them. And that span should reveal to me the file name. That's happening. But that's being read. Okay. So run it again. Okay. I'm going to take a few seconds to make the cow. This is all startup. That cow was super early. Okay. It did some stuff. Back to Yeager. Back. Fine traces. See, I had 51 spans. Now I have 52 spans. That's a good sign. When I click into this trace, I'm going to scroll down and look for, what did I call that? Something about a song. There it is. It says read file for song. And it has a file name. Input slash song dot text. Okay. And I can tell that it's taking place. It's not quite the last file that's read, but it's close. There's one other one somewhere. That's kind of interesting. That surprises me. But that's interesting. Okay. So there's a read file for song, but it only showed up once. There's only one occurrence of song on the screen. So that was, that was the hard one, but it only got us one. So let's go do the other one. An image dot TS. There's another read file sync. This one conveniently is in a function, not a constructor. So this should be easier. Make a tracer image dot TS. This, the name of this tracer is going to show up. Let me show you where that shows up. Cause I find it interesting. It's here under tags for the span. We have hotel library name and that says song dot TS. So that's where the tracer name winds up. In this case, that tells me that the, because I named it this, that tells me which file the, the span was created in. Also, I can search for its name in the code. All right. We've got this tracer. It's here under tags for the span. We have hotel library name and that says song dot TS. So that's where the tracer name winds up. We've got this tracer. And now we're going to use it. To wrap the body of this function. In a tracer. So we'll call this one read PNG. Cause this is reading a PNG file. And then move this to the bottom. It's really important. One reason I put this in the alias is you have to return the output of start active span. Or else it gets munched and your function doesn't return anything. Probably just type script gets mad at you. If you're in JavaScript that can be really tricky. Okay. Oh, I don't think this either. There's too much happening right here after the span ends. So let's make that a result again. Okay. So now I'm doing the read file sync. Oh, right. The point was to set an attribute on the span, which is what's the, we call the app file name before. Let's use that again. I like to prefix. Pardon me. I'm going to sneeze again. Okay. In custom attributes, I like to prefix them with like app dots so that I can find them easily. It doesn't help as much in Yeager, but it does in Honeycomb. All right. So now we're adding the file here. Let's see which files we're reading from image.ts. Let's see how many spans we get. Thanks. Thanks, David. We're the bless you. All right. Yeager, what do you have? Fine traces. What's at the top? 86 spans. 86 spans. That says something. All right. So here we are at the top. We've still got a lot of these read file syncs at the beginning. Spoiler. Those actually wind up inside the first HTTP call. Or the first Axios call, I should say. But here, now we have read PNG. We have a bunch of read PNG spans. Read PNG. Read PNG. The browser tells me that I have 34 of those. 34 read PNG spans. Wow. Okay. Well, which files are we reading? App file name. Input slash don't peek. Okay. App file name. Input source. Input slash bigger tree dot PNG. Bigger tree again. Bigger tree again. Bigger tree again. Okay. It's, it's clearly. It's clearly being the same pile over and over. Yeah. There's a link. The question from Carlo. It's amazing. Thank you so much for great questions. Everyone. It looks like you're modifying the production code with what's the overhead you are adding? Have you measured that? How to evaluate the threshold where is worth as this traceability operations. They're imagining a fast and quick set of light operations. What would be the impact? Okay. So adding tracing to production code. There are people who measure the impact of this. It's very small. Tracing. Tracing production code is like a modern standard for production code because in this case it's just giving us a picture of what one program is doing. But in a distributed system, it gives you a picture of the overall system. Tracing. In production. When it's carefully curated like this is, you get like a strong picture of what's important in your app. An extreme level of tracing would be profiling. And profiling is it's known to add overhead in production. But these days we have continuous profiling where that's pretty low overhead too. Tracing is less overhead than profiling generally because it's not as high resolution. I'm only tracing the units of work that I said are important. A file system access. Let's see how long that takes actually. How does this file system access? This one is taking 273 microseconds. Wow. That's really small. Actually the whole read, well, okay. That's just the read file sync which opens the file. My span of read PNG, which is also gathering the data and doing a little processing on it. But it's also reading all the data. 1.29 milliseconds. So this file system access of 1.29 milliseconds. The overhead of tracing is going to be in the microseconds. It's negligible. So if you have super, super high performance code that loops around a lot, actually totally trace that because then you'll be able to optimize the code at Honeycomb. As part of our database, we've run lambdas like in production, if you make a query into Honeycomb that's like over more than a few hours of data, behind the scenes we're spinning up lambda functions to read the data from S3 for the database. And we're paying for every one of those. But we're paying for it because we want your query to come back in a second, maybe two seconds. So we need it to be incredibly fast. And we're paying for every CPU cycle for every millisecond. Those lambdas are running. So we optimize the hack out of those to keep this affordable. And we do that with tracing. So I would say if you care about performance, the overhead of tracing is more than made up for by the ability to see what's taking up time in your system. And where you're spending that. Okay, so that's my opinion on that. For this program, how long does this program take? It takes 1.8 seconds. Nobody cares. I mean, nobody cares about the overhead of tracing. Also, I don't really care that it takes a second. I think the node startup time is much longer. Great. And then there's a few other questions from. Okay. Yeah. So Rob asks, can you programmatic the decide if tracing should be activated during a request? For example, if you want to monitor a specific request, the critical given some runtime context. Okay. Yes. So that's fun. Tracing locally, like we're doing here, where we're gathering all the traces and using it for local debugging. You absolutely want every trace to be recorded in this local Yeager. As soon as I duck or compose it will be gone. But you want to keep every trace. In production. I'm looking at this and there's like 86 spans. If this were a batch job that I'm running in production. Okay. Actually, if it were a batch job, I'd probably want to keep everyone anyway. But if this were a web service request, or even a batch job that runs on a queue, and I'm doing a million of these in a minute, I absolutely don't want to keep 86 million spans. The generation of them is less of a problem than the storage. Just the storage gets expensive, especially if you want them to be searchable. And in that case, you do sampling. You can do sampling in multiple ways. You can decide at the beginning of a request. Okay. We're not going to keep this one. And then all of your span dot span creation and span dot set attributes. Those are all going to be no ops. If you decide at the beginning that we're not keeping it. And then there's, there's ways to decide at the end instead so that you can do things like keep all the errors. The trick with tracing is that you want to keep all of a trace or none of it. So you do want to be consistent. You don't want like randomly a couple of read files from this run and a couple of read files from that run. The point of a trace is that it tells the store a story and it's a coherent story. So in production, you would keep one out of 10, one out of a hundred. If it's a health check, one out of a thousand, whole traces. But one really nice thing about adding traces to understand the program locally is that it can still have that in production. And I get to decide by setting the sampling rate, how many stories I want from production, but I can always get to one. Okay. More questions. I think there was one more, I think, and then someone asked for the template demo. Say cold people again. But luckily Carlos sent it in. So I think that's their answer. So that's perfect. And then there was Ludovic with the question, what's your point of view on using agent or gateway to collect tracing on communities? Okay. I am going to go with. Ask me on Twitter or something because that's totally like out of scope for this particular topic. You can use an agent or a gateway on it. Well, one, I don't really care. I would probably pass that opinion to, or that question off to someone else. I don't have strong feelings about that one. And I want to focus here on like the local tracing and the, the how to add tracing to a note app in this case. Thank you for the question anyway. LinkedIn user. Okay. We saw that we can read files. We saw that we are reading the same file over and over. Bring that back. Okay. I need to expand this shrink this. And we're reading treat multiple times. So my next question that I have for my own app is. Okay. Why are we reading bigger tree? What's reading bigger tree? I can go with that in a couple ways of like what, here's my read PNG. What calls that? I can ask where to go. Okay. Read PNG is called I read image, but read images like just one. This looks like just a wrapper function. That's not interesting. So while in profiling where it does like every function call, it would create a level for this. I'm not going to, this isn't meaningful. Clearly at some point, I used it to print a bunch of debugging stuff, but I'm not now. So let's go outside of that. This is something I could do either outside or in or inside. Okay. It looks like read images called in four differences. So any of those can be interesting. And so I don't know like, where do I want to follow this tracing through? So one other thing that I can do. Oh, go ahead. There's another one again. Carlo. Thank you so much. Do you have any techniques or best practices to keep tracing code separated from the actual code implementation? In general, if you have auto instrumentation, you're not even going to see it. The calls to the file system just happen and just get it instrumented. That one's not actually called or it would show up. But when the tracing is about your code and you're making custom spans, don't separate it from your code. Now, I can say that, but I also will say do wrap it, create a little wrapper. Where did I put that? Here. Okay. So like here where we're doing read PNG. And I do this enough times that I have an alias for it. I say return start active span. And so that part, the name to type in each time and the name should be searchable in your code. You want to hard code that. But then I always have to remember to close the span before the return. So I've left out the part in these where, the part that I put in Maine, where if there's an exception, I want to catch it and put it on the span and end the span anyway. So I actually would recommend making yourself a little wrapper function that does what you want. And calling that instead of the open telemetry start active span. And that's, that's going to be, I don't know, it might be 10 lines. But that's, that's as far as I would go with obstruction. This part set attribute, put this in your code. If you don't have the S variable, you can also do this with hotel dot trace dot get active span. You can do that anywhere, even if you don't know where you are. For instance, I could do that in Maine. In a function. Maine doesn't know about the tracing around it. And this trace ID is actually really important. So when we, we put it to the console. So I would do dot hotel trace dot get active span, question mark in case it's null, set attributes app dot created trace ID and put this in here. Now, a lot of people worry about this is cluttering up my code. Well, one, so do log statements, but we log things because they're important when we log things. I would trace that I would add as add an attribute to a span instead, if you have tracing, we console dot log this because it's important. And adding a set attribute to your code says something about what's important in that function. And I find it actually express it. I mean, maybe you want a little wrapper function for this. Rapper functions are great because they let you like create little organizational standards, such as maybe instead of app, you add a different prefix to every, or just a consistent prefix to every field name. So do create wrapper functions, but don't try to like completely separate the tracing from your code. Make this searchable between the attribute on the span in your tracing system and the code itself, because that draws a connection. And this is how you get back and forth from your code to, okay, where's this in my traces? You can search for that field. And from the trace to, okay, I see that there was an error on this span. What code is that? Cool. Okay. Yeah. I think that's a good way to quote sample, give your Twitter handle. If someone wanted to ask a follow up questions or so, but you can also save it to the end. I'm Jessica Tron on Twitter, J-E-S-S-I-T-R-O-N. Okay. But for here, let's see how we got as far as, I don't know, I don't know how many of you have seen this. I don't know how many of you have seen this. But as far as finding that there are all these read PNGs of duplicate files, the next step that they take here is to find out what those are part of, either by going up or by going down. In this case, it turns out to be useful in a lot of cases to also, like as I'm moving up from the file, I also go down because I want to find like what's in action. What are all these file reads part of? And my main function, I have a couple of main steps, read image. Oh, well, we know what that's doing. We already have a record for that. Plan spans and send spans. And so if I go into like plan spans, which is a major step, it's doing a couple of things, but I could span, add a span for this, plan spans. This is a fairly easy one. Oops. Enter. Down, down, down, down, down, down. Don't forget to end the span before the return. And this will give us a span for just like one level down in main, and we can see how many of the file reads are inside of plan spans. And then we can kind of zero in on the areas that I want to refactor. And then I haven't done any. We don't have to get this done in an hour. Then I can try to shift the spans and the look of them as I do a refactor. Okay. Let's see if plan spans showed up. So this is, this is another thing that I do when I'm adding tracing is I just, every time I want to see a difference, I love to see a difference. Some people love seeing green tests. And that just like does it for them. And they use TDD all the time and TDD is excellent. It's a fantastic tool. It's a tool for thinking, a tool for design. And it's a, it's a great way to code. But sometimes you're presented with a program that doesn't have tests and you can't just do TDD on something like that. Tracing works for both. And I love seeing a different in my trace. I love my software telling me, Hey, check this out. I did something new. Oh, and spans right here. Okay. So if I like shrinks, no, no, no, no, no, over here, shrink. No, no, no. There. Okay. I can, here's our read PNG. That's at the beginning of main. And here is plans. So it's all of this incorporates all of those. All of those files. And I say, okay, well, it's somewhere in plan spans. And then I can dig into this. And I'm like, okay, there are three main components to plan spans. I'm going to cheat. I know which one it is. And, but I can see which of those are taking time. Which of those are reading files. Waterfall, build pictures in water. Oh, watch out. Oh, watch out. I think this is, this is the hard one. No, this is the hard one. And then I need to get this to the end, which is actually tricky. Where's the end of this function? 94. Um, And then some, um, person is asking also, is the tool you mentioned? TDD question work. Oh, okay. Oh, Okay. Okay. Great question. TDD is called test driven development. And there we don't make a change to the code until we've written a test. Um, you start with a failing test. Like if you want to add a feature, you start with the tests, the tests that the feature works and the feature doesn't work because you haven't added it yet. And then you add the feature and then the test is green. Um, and this is really satisfying. And then from, from green tests, when you have everything nicely unit tested, um, in automated tests that you can run, uh, with a push of a button or automatically on file save. Uh, then you can refactor, you can move your code around, uh, without having an effect on the outside and all your tests stay green. And that's really satisfying. In my case, I don't have tests to stay green. So I'm looking at the traces. Do they do what I expect? Um, and this, um, this is teaching me about how the program works. Um, and it's something that I can build in gradually. Um, which is harder to do with tests. And I don't have a tracer. So we need to do that. So as I, as I like, add, um, additional spans around things that are important. Um, I get a better idea of like the shape of the program and, um, get a better idea of like the shape of the program and not just the code, but the shape of the program execution. Like with these operations, I'd plan spans, which takes a long time, which is hard. Um, yeah, you should show me this now. Find traces. I want like one more span. Oh, 88 spans that look good. It's random. How many pictures it builds in, uh, to the trace. And here, uh, Oh, I think someone asked where they can learn about TDD. Oh, let me give you my favorite recommendation. Gpahill.org. Jeep. Um, Gpah is the best for teaching about. TDD. Um, Gpahill.org. Okay. My router is not making the connections. There it is. Uh, yeah. Highly recommend. Um, he's the great material for working in smaller increments and generally a great programmer. He's, he's funny and very real. Okay. Plans spans. We've, we've got a read. Ha, build pictures in waterfall. So build pictures in waterfall. Now most of the read files under it. So I know that it's part of build pictures in waterfall. That it's reading the same file over and over. Um, and at that point I can. And start. Moving those reads out. Um, which I'm not sure I have time for today because any, is it okay? What if I, if I show what, what these, what this trace looks like in honeycomb with its little. Yeah. Um, yeah, we have on the top of the hour. So nine minutes left. So, okay. Okay. Check this out. I'm also sending these to honeycomb. Um, with my local collector and. Yeah. Oh, it looks like I have two of them going on. So let me check my recent traces. Um, and let's get. Now you stop group by trace ID. Last 10 minutes. There we go. Okay. So here is my trace of everything. Um, where I can look at the file name. Here's a little easier to see. Oops, not servicing. Do it. Here you can see bigger tree, bigger tree, bigger tree, bigger tree. Okay. So that's the trace we're familiar with, but the interesting trace is this big one. And here is, yep, here it is. Here's the, the trees and the balls. And I need to zoom out to make it look better. There we go. Um, and the little song and some sort of colors here. That's okay. Uh, what I really wanted was this trace ID. Um, let me.  So I get just one of them. Okay. And really what, so now I'm, I'm, I'm graffing the spins in this one trace. And here they are as a stacked graph. Um, and so it makes a tree in this case. And here, uh, in the heat map, uh, it makes a whole drawing. So this is, this is the game of, um, switch to absolute time for me. Um, of this, um, the program is that it draws a picture in a heat map. I feel like I should show you what a heat map usually looks like. Oh, let's see where's a random heat map. Um, let's see where's a random heat map. Um, let's see where's a random heat map. A demo can get a random heat map of latency. Um, front end. This is a heat map. It shows like higher is slower, darker is more. There's those requests. Wow. Some of them are really slow. Uh, but, um, the, the program that I'm working to make configurable, um, it's, it's reading PNGs and making a picture in, uh, which is some visualization art that I'm rather happy with. And then you can do things like say, Hey, what's different about these spans? And it turns out that what's different is their reindeer name. Those are dancer, um, pixels. And then you can group, uh, group by the reindeer name and, Oh, no, I need, I need to put it back in the time range. Um, custom 40 to 50. I, there they are. That's right in the middle. And the results. I'll see my group. Bye. And you can see that there's dancer and there's Rudolph and there's answer. I think this is really cute. And I want it to be configurable. Um, you can already draw your any PNG. Uh, but, but, uh, regardless when you click into a trace, um, you're always going to see the Christmas song and you're always going to see ornaments and trees. Um, and after I move ornaments and tree reading up to the beginning, then we'll read the files less, but also, uh, it'll, I'll be able to, um, accept a configuration file that says which drawing should be in here. These drawings are configured. Um, in here and no, no, here's the bigger tree. It looks like this, um, in a PNG. And this is the PNG that gets converted into, uh, Santa and his reindeer. So that's, uh, that's the fun. Yeah. Yeah. And then actually in here it's a little complicated, but the, the blue channel is like, how dark to be in the heat map and the red channel correspond to, uh, to the attributes on the span. Um, so that's how the, the PNG like becomes a picture. Um, yeah. Perfect. Such a great image. Um, came out of there. So lovely. Um, I have four minutes left. So if anyone has any questions, I highly recommend you to type them out now. So we have time to get to a few of them at least. Um, but yeah, anything else that you want to show. Oh, there's a question already. Uh, will it be possible for you to show the RG are in your code implementation? What's RGR? Um, maybe if the question asker would be. Um, a little bit more or what they actually want to see. Uh, anything else that you want to show us or, um, I, yeah. Yeah. I didn't quite get as far as like doing a refactor and seeing the trace change, but I did earlier today when I practiced this. Um, and it's really satisfying. And I think that this, Oh, red green refactor for TDD. Would it be possible for you to show read green for factor in your code implementation? Definitely not because I don't have any tests. Don't have a test framework set up. Did not write this for testability. I wrote this for hurry, hurry marketing has a thing going on and I wanted to be cute. And it has to be up before Christmas. So there was like this Christmas deadline. Um, in general, I think T, um, I think that the red green refactor and test driven development. As part of test driven development is a great, great way to code, especially when you, you intend the code to go into production, which this was never intended for, but often you have code that was not intended to go into production, but now they're like shipping. The customer service reps are like, Oh, we'd love to put this in our newsletter and send it to the customers. But I'm like, but it's not Christmasy. It's too Christmasy. It's too hard coded. Um, and so when you want to move a piece of code from, well, it works, but I can't easily change it because I don't know when I'll break it, right? It's too fragile because it doesn't have tests. I think traces are a great way to be like, okay, I can have some confidence that my refactoring is working and then I can move it towards something testable. For instance, if I get a full configuration file, the random seed and the time of day, um, that will deterministically produce a set of spans, um, for the output that, that draw the three pictures. Um, and that I can put a test around. And then I can put a test around the individual parts because all the file reads are happening at the beginning. Um, and all of the, the open telemetry send spans are happening at the end. Um, and that, uh, that will make each part in the middle testable. And so this is, this is moving the code to production ready, uh, testability wise at the same time, it's immediately making it more production ready by giving you visibility into what's happening at runtime, uh, because the same traces that are helping me while I'm coding will help in production at a smaller scale. We'll sample them then. Perfect. And then, uh, Daniel asks a compliment of the, this is interesting and then wanted to know where, where to learn more about observability and also ask, will a recording of this be available? So I can answer that it will be available. And it's going to be in the, um, club native meeting foundation YouTube. I think it just a matter of an hour or so. Um, so you can check out the recording there very soon. Um, but as the final question, I guess for today and after that we will wrap up, um, what do you think is the best ways for people to learn about these concepts? Um, uh, will I say that the CNCF has a couple other open telemetry specific meetups. There's open telemetry in practice. There's an open telemetry and user group, uh, and user discussion group, I think, um, and open telemetry is the modern standard for observability. So that's a great place, uh, to come and talk to people and learn more. Perfect. So that's where everyone will be headed after this. Always great to have the next resource ready. But thank you everyone for joining the latest episode of cloud native live. It was great to have a session about open telemetry today. And we also really loved the interaction as well as the question from the audience. Amazing questions, amazing reactions. Always very, lovely to hear that. And as always, we'll bring you the latest cloud native code every Wednesday. And in the coming weeks, we have more great sessions coming up. So tune in for those. Thank you for joining us today and see you all next week.


I'm in las cincias You just please the masses.  We all know you lost your flow call me else I'll let it go after this your ripple vanish. Call me a magician throwing all the punches till I beat you to submission Blanky-boanky sub yeah, I'll cancel my subscription Unexpected comeback like the Spanish Inquisition screaming in the tree team signing so hard to be funny Anything to get the people to give you more money. It's a scary game guys.     You'll never want fish your face I'm giving you my invitation blue hole in your own nation still the villain at the end of the day No wonder Adam went and ran away the fireworks show that the people deserve.   I knew you were Cold-hearted businessman me and I'll hit you with my band I forecast you mess you Trixins as she time to bring it back to me Roasted bird so hard now We got some kfb time to talk facts.